I don't understand why this code is bad:

   let n1 = int::from_str(line);
   if n1 == 0

compiler complains:

00003.rs:7:12: 7:13 error: mismatched types: expected
`core::option::Option<int>
` but found `<VI0>` (expected enum core::option::Option but found integral
varia
ble)
00003.rs:7    if n1 == 0

wht's wrong?
Thx.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to