0

According to https://doc.rust-lang.org/std/result/, the stuct Result is defined at std::result, however:

fn test() -> std::Result<u32, u32> {
    Ok(0)
}

wont compile. I have to change to core::result::Result<u32, u32>

How could I know, by Rust's page for std::result, how to import it?

Shepmaster
  • 326,504
  • 69
  • 892
  • 1,159
Guerlando OCs
  • 162
  • 1
  • 29
  • 87

0 Answers0