You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a beginner to Juice who is still trying to figure out basic usage, and not finding the book or juice-examples very revelatory. To try to figure things out by experiment, I wrote this (presumably invalid) code:
I was expecting to get an error message like "Error: expected input of size $foo but got input of size $bar". Instead, I got this panic message, which gives me very little help in figuring out what the error is.
As a beginner to Juice, I'm not certain whether this qualifies as a "bug in Juice", but the API docs do not suggest that Layer::forward is supposed to be able to panic.
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /n/HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/juice-0.3.0/src/layer.rs:535:34
stack backtrace:
0: rust_begin_unwind
at /rustc/b7bc90fea3b441234a84b49fdafeb75815eebbab/library/std/src/panicking.rs:575:5
1: core::panicking::panic_fmt
at /rustc/b7bc90fea3b441234a84b49fdafeb75815eebbab/library/core/src/panicking.rs:65:14
2: core::panicking::panic_bounds_check
at /rustc/b7bc90fea3b441234a84b49fdafeb75815eebbab/library/core/src/panicking.rs:150:5
3: <usize as core::slice::index::SliceIndex<[T]>>::index
at /rustc/b7bc90fea3b441234a84b49fdafeb75815eebbab/library/core/src/slice/index.rs:259:10
4: core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
at /rustc/b7bc90fea3b441234a84b49fdafeb75815eebbab/library/core/src/slice/index.rs:18:9
5: <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index
at /rustc/b7bc90fea3b441234a84b49fdafeb75815eebbab/library/alloc/src/vec/mod.rs:2736:9
6: juice::layer::Layer<B>::forward
at /n/HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/juice-0.3.0/src/layer.rs:535:34
The text was updated successfully, but these errors were encountered:
I'm a beginner to Juice who is still trying to figure out basic usage, and not finding the book or juice-examples very revelatory. To try to figure things out by experiment, I wrote this (presumably invalid) code:
I was expecting to get an error message like "Error: expected input of size $foo but got input of size $bar". Instead, I got this panic message, which gives me very little help in figuring out what the error is.
As a beginner to Juice, I'm not certain whether this qualifies as a "bug in Juice", but the API docs do not suggest that Layer::forward is supposed to be able to panic.
The text was updated successfully, but these errors were encountered: