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
  • 388,571
  • 95
  • 1,107
  • 1,366
Guerlando OCs
  • 1,886
  • 9
  • 61
  • 150

0 Answers0