Panic when terminal size is too small #3

Open
opened 2021-12-27 16:36:38 +00:00 by AlexBethel · 1 comment

The Flex widget panics when there is not enough space to fit all non-flex children:

thread 'main' panicked at 'attempt to subtract with overflow', /home/alex/Desktop/tuid/src/widget/flex/mod.rs:337:25
stack backtrace:
   0: rust_begin_unwind
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:101:14
   2: core::panicking::panic
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:50:5
   3: <tuid::widget::flex::Flex<T> as tuid::widget::Widget<T>>::layout
             at ./src/widget/flex/mod.rs:337:19
   4: tuid::Window<T>::draw
             at ./src/lib.rs:102:4
   5: tuid::Window<T>::run
             at ./src/lib.rs:116:4
   6: tuid::main
             at ./src/main.rs:41:2
   7: core::ops::function::FnOnce::call_once
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
The `Flex` widget panics when there is not enough space to fit all non-flex children: ``` thread 'main' panicked at 'attempt to subtract with overflow', /home/alex/Desktop/tuid/src/widget/flex/mod.rs:337:25 stack backtrace: 0: rust_begin_unwind at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5 1: core::panicking::panic_fmt at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:101:14 2: core::panicking::panic at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:50:5 3: <tuid::widget::flex::Flex<T> as tuid::widget::Widget<T>>::layout at ./src/widget/flex/mod.rs:337:19 4: tuid::Window<T>::draw at ./src/lib.rs:102:4 5: tuid::Window<T>::run at ./src/lib.rs:116:4 6: tuid::main at ./src/main.rs:41:2 7: core::ops::function::FnOnce::call_once at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. ```

so don't make the size too small

Ooh that's a nasty one. Tbh I have no idea how Flex even works. I'll get on it asap tho. Thanks!

~~so don't make the size too small~~ Ooh that's a nasty one. Tbh I have no idea how `Flex` even works. I'll get on it asap tho. Thanks!
able started working 2022-01-04 22:36:26 +00:00
elfein was assigned by able 2022-01-04 22:36:43 +00:00
able stopped working 2022-01-04 22:36:53 +00:00
27s
able added the due date 2022-01-03 2022-01-04 22:37:02 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Total Time Spent: 27 seconds
able
27 seconds
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

2022-01-03

Dependencies

No dependencies set.

Reference: elfein/tuid#3
There is no content yet.