You can't type check variables like this. The think about why the others are unreachable. This match always executes the first arm because i8 in this case is a variable name and not a type
sounds weird then how can i do something like that ? it works well when it comes to enums
Does not have sense do type check in Rust because you always already knows the type of your variables.
agreed but isn't there a way anyway ?
is not possible and it would be unnecessary to do type checking.
Обсуждают сегодня