この環境で、試しに、
$cargo atcoder new abc164
を実行。
abc164/src/bin/a.rsに次のソースを入力
use proconio::{input, fastout};
#[fastout]
fn main() {
input! {
r: f64,
}
println!("{}", 2.0 * r * 3.14159265358979);
}
続いてtest
atcoder/abc163$ cargo atcoder test a
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
running 2 tests
test sample 1 ... ok (abs error: 6.217e-15 , rel error: 9.895e-16 )
test sample 2 ... ok (abs error: 4.547e-13 , rel error: 9.914e-16 )
test_result: ok
atcoder/abc163$ RUST_BACKTRACE=1 cargo atcoder submit a
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
running 2 tests
test sample 1 ... ok (abs error: 6.217e-15 , rel error: 9.895e-16 )
test sample 2 ... ok (abs error: 4.547e-13 , rel error: 9.914e-16 )
test_result: ok
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/****/.cargo/git/checkouts/cargo-atcoder-22f22504501ff75c/e51f21f/src/atcoder.rs:536:24
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:77
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:59
4: core::fmt::write
at src/libcore/fmt/mod.rs:1052
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1426
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:62
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:204
9: std::panicking::default_hook
at src/libstd/panicking.rs:224
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:472
11: rust_begin_unwind
at src/libstd/panicking.rs:380
12: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
13: core::panicking::panic
at src/libcore/panicking.rs:52
14: std::future::poll_with_tls_context
15: cargo_atcoder::main::{{closure}}
16: <std::future::GenFuture<T> as core::future::future::Future>::poll
17: std::thread::local::LocalKey<T>::with
18: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on
19: tokio::runtime::context::enter
20: tokio::runtime::handle::Handle::enter
21: cargo_atcoder::main
22: std::rt::lang_start::{{closure}}
23: std::rt::lang_start_internal::{{closure}}
at src/libstd/rt.rs:52
24: std::panicking::try::do_call
at src/libstd/panicking.rs:305
25: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:86
26: std::panicking::try
at src/libstd/panicking.rs:281
27: std::panic::catch_unwind
at src/libstd/panic.rs:394
28: std::rt::lang_start_internal
at src/libstd/rt.rs:51
29: main
30: __libc_start_main
31: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
面白い感じでしたので、実験させていただきました。 が、残念なことに、submitがうまく出来ません。 環境:
この環境で、試しに、 $cargo atcoder new abc164 を実行。 abc164/src/bin/a.rsに次のソースを入力
続いてtest
これは、順調。 次に、submitすると・・・(参考データにRUST_BACKTRACEをつけておきます。つけなくても同じ結果です。)
となります。 便利そうだったので、ちょっと残念。 治ると嬉しいのですが。