The syntax is None
, not Option(None)
. Usually Rust figures out the Sartre question by itself from context, e.g. env::args().nth(5) == None
doesn't need any type annotations. In case of Option
, you still can specify the full type without type ascription, with the turbofish: None::<String>
5 Likes