Closed elichai closed 1 year ago
Current output:
error[[E0282]](https://doc.rust-lang.org/stable/error_codes/E0282.html): type annotations needed
--> src/lib.rs:4:13
|
4 | match n.try_into() {
| ^^^^^^^^
5 | Ok(n) => {
6 | println!("len: {}", n.len());
| - type must be known at this point
|
help: try using a fully qualified path to specify the expected types
|
4 | match <&[u8] as TryInto<T>>::try_into(n) {
| ++++++++++++++++++++++++++++++++ ~
https://play.rust-lang.org/?gist=e9720a11b44e59362937210443cb7b86 The current output is:
Ideally it would hint me on how should I annotate, especially here where the answer is not obvious, it could tell you to either do
match TryInto::<[u8; 32]>::try_into(n) {
or<[u8; 32]>::try_from(n)