Skip to content

thread 'main' panicked at 'attempt to subtract with overflow', textflow-0.2.0/src/align.rs:74:21 #11

@Luro02

Description

@Luro02

This code results in a crash:

fn main() {
    dbg!(textflow::columns(
        ["a\u{1b}[32mINFO\u{1b}[0maaaaaaa", ""],
        textflow::Spacing::AROUND,
        textflow::Layout::default(),
        32,
    ));
}
> cargo run
   Compiling somecrate v0.1.0
    Finished dev [unoptimized + debuginfo] target(s) in 1.23s
     Running `target\debug\somecrate.exe`
thread 'main' panicked at 'attempt to subtract with overflow', .cargo\registry\src\index.crates.io-6f17d22bba15001f\textflow-0.2.0\src\align.rs:74:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\somecrate.exe` (exit code: 101)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions