Comment

Comment by loeg

Can you elaborate on the usage of your error type? Is the implicit conversion via return type and ? operator sufficient? E.g.,

  fn add(s1: &str, s2: &str) -> Result<i64, MyError> {
    ...
    let i1 = i64::from_str_radix(s1, radix)?;
    ...
  }
Thanks!
parent loeg 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton