-
-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
bugSomething isn't workingSomething isn't workingupstreamThis issue is being tracked upstreamThis issue is being tracked upstream
Description
Describe the bug
The following command results in a the program crashing with the error thread 'main' panicked at 'attempt to subtract with overflow
so how to setup async rust
To Reproduce
Steps to reproduce the behavior:
- Type:
so how to setup async rust
Environment
- OS: Ubuntu 18.04
- Terminal: gnome-terminal
so --version: so 0.4.1
Additional context
I was able to make the error go away by doing the following:
diff --git a/src/term.rs b/src/term.rs
index 77f5457..b6d5a07 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -47,7 +47,7 @@ impl Term {
/// Print text to stdout
pub fn print(&self, text: &str) {
- self.skin.print_text(text)
+ self.skin.print_inline(text)
}
/// Print text with error styling to stderrGoing to be honest with you here.. I don't Rust very well (tyring my best to learn!) and I have zero clue what the difference is between print_text and print_inline is. Just wanted to throw that out there though.
Stack trace:
△ Projects/tools/so RUST_BACKTRACE=full target/debug/so how to setup async rust master 1d :: ⬢
thread 'main' panicked at 'attempt to subtract with overflow', /home/e/.cargo/registry/src/github.com-1ecc6299db9ec823/minimad-0.6.4/src/compound.rs:117:19
stack backtrace:
0: 0x55f435415ba5 - backtrace::backtrace::libunwind::trace::h34afbfad7fd770fc
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
1: 0x55f435415ba5 - backtrace::backtrace::trace_unsynchronized::h460d522b1619a600
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
2: 0x55f435415ba5 - std::sys_common::backtrace::_print_fmt::ha45fac10086813b4
at src/libstd/sys_common/backtrace.rs:78
3: 0x55f435415ba5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hde84f63fcfd0e6de
at src/libstd/sys_common/backtrace.rs:59
4: 0x55f435441aec - core::fmt::write::h540ac4a6a1232abc
at src/libcore/fmt/mod.rs:1076
5: 0x55f43540efd2 - std::io::Write::write_fmt::hc344eafd6e850b4d
at src/libstd/io/mod.rs:1537
6: 0x55f435418260 - std::sys_common::backtrace::_print::h4db88ff15cb5d61d
at src/libstd/sys_common/backtrace.rs:62
7: 0x55f435418260 - std::sys_common::backtrace::print::h5fc39e1b1f610bd3
at src/libstd/sys_common/backtrace.rs:49
8: 0x55f435418260 - std::panicking::default_hook::{{closure}}::h59e55edacb1d974a
at src/libstd/panicking.rs:198
9: 0x55f435417fac - std::panicking::default_hook::heee4c8016dfbf328
at src/libstd/panicking.rs:217
10: 0x55f4354188a3 - std::panicking::rust_panic_with_hook::h8405b6301c79fb5a
at src/libstd/panicking.rs:526
11: 0x55f43541849b - rust_begin_unwind
at src/libstd/panicking.rs:437
12: 0x55f43543f7a1 - core::panicking::panic_fmt::h78830ea6a34e7206
at src/libcore/panicking.rs:85
13: 0x55f43543f6ed - core::panicking::panic::h68e56c2eeba99c8c
at src/libcore/panicking.rs:50
14: 0x55f434c96c0d - minimad::compound::Compound::cut_tail::h65a621fcce14ec17
at /home/e/.cargo/registry/src/github.com-1ecc6299db9ec823/minimad-0.6.4/src/compound.rs:117
15: 0x55f434c7062c - termimad::wrap::hard_wrap_composite::ha144c51dfb0493a2
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/termimad-0.8.24/src/wrap.rs:137
16: 0x55f434c71116 - termimad::wrap::hard_wrap_lines::hcc2fff69ff958a06
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/termimad-0.8.24/src/wrap.rs:172
17: 0x55f434c72f2e - termimad::text::FmtText::from_text::hdd93418c5a6ceb6b
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/termimad-0.8.24/src/text.rs:44
18: 0x55f434c72de0 - termimad::text::FmtText::from::h5006d4ececb9711c
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/termimad-0.8.24/src/text.rs:32
19: 0x55f434c7f0eb - termimad::skin::MadSkin::term_text::hd65d68486384d1a9
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/termimad-0.8.24/src/skin.rs:208
20: 0x55f434c7f160 - termimad::skin::MadSkin::print_text::h1276bb441ef97417
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/termimad-0.8.24/src/skin.rs:243
21: 0x55f4348a5408 - so::term::Term::print::hc2c92c17e3749a58
at src/term.rs:50
22: 0x55f434976b1b - so::run::{{closure}}::hd91685f50a3d1549
at src/main.rs:86
23: 0x55f4348d0da2 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hc185dde5972d596e
at /home/eyehuda/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:74
24: 0x55f434a22126 - tokio::runtime::enter::Enter::block_on::{{closure}}::h5f469053301f4b06
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.21/src/runtime/enter.rs:163
25: 0x55f4348fe628 - tokio::coop::with_budget::{{closure}}::h57a6cfb65d473ae4
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.21/src/coop.rs:127
26: 0x55f434953c5f - std::thread::local::LocalKey<T>::try_with::h07bcdc5cb36eec5e
at /home/eyehuda/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:263
27: 0x55f434953988 - std::thread::local::LocalKey<T>::with::ha8658e5ab000970d
at /home/eyehuda/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/thread/local.rs:239
28: 0x55f434a21f09 - tokio::coop::with_budget::h2c8709ab9e7f36d0
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.21/src/coop.rs:120
29: 0x55f434a21f09 - tokio::coop::budget::h23633a17dc8a3c3b
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.21/src/coop.rs:96
30: 0x55f434a21f09 - tokio::runtime::enter::Enter::block_on::hb6e2301a42f9526b
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.21/src/runtime/enter.rs:163
31: 0x55f434a1880e - tokio::runtime::thread_pool::ThreadPool::block_on::he9f5aa50e1b2de2a
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.21/src/runtime/thread_pool/mod.rs:82
32: 0x55f434a04ad1 - tokio::runtime::Runtime::block_on::{{closure}}::h9b78ea3a1e01e1ae
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.21/src/runtime/mod.rs:446
33: 0x55f4349c0348 - tokio::runtime::context::enter::hde3314b2c7b15180
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.21/src/runtime/context.rs:72
34: 0x55f434953116 - tokio::runtime::handle::Handle::enter::hc1f65dd01c598c00
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.21/src/runtime/handle.rs:76
35: 0x55f434a04a18 - tokio::runtime::Runtime::block_on::h49c85d53d2a8405f
at /home/eyehuda/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.21/src/runtime/mod.rs:441
36: 0x55f4349f4fb2 - so::main::h3313791cf880d857
at src/main.rs:21
37: 0x55f43494ed1d - std::rt::lang_start::{{closure}}::hc87592d1bfdb2430
at /home/eyehuda/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
38: 0x55f435418d48 - std::rt::lang_start_internal::{{closure}}::h7cea099ad4edf1eb
at src/libstd/rt.rs:52
39: 0x55f435418d48 - std::panicking::try::do_call::h42d93372c44025d2
at src/libstd/panicking.rs:348
40: 0x55f435418d48 - std::panicking::try::hb47a4182362d3341
at src/libstd/panicking.rs:325
41: 0x55f435418d48 - std::panic::catch_unwind::h2afcfbf3125915b4
at src/libstd/panic.rs:394
42: 0x55f435418d48 - std::rt::lang_start_internal::h4f696727fe904f48
at src/libstd/rt.rs:51
43: 0x55f43494ece7 - std::rt::lang_start::hf0b996588ea570bf
at /home/eyehuda/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
44: 0x55f4349f508a - main
45: 0x7fce5b547b97 - __libc_start_main
46: 0x55f43488f19a - _start
47: 0x0 - <unknown>Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingupstreamThis issue is being tracked upstreamThis issue is being tracked upstream