Hacker News new | past | comments | ask | show | jobs | submit login

How does this improve on binding the `Err`?

Edit: I see now in the first example:

    let (Some(count_str), Some(item)) = (it.next(), it.next()) else {
        panic!("Can't segment count item pair: '{s}'");
    };
Binding the error here would be much verbose, since both must succeed.

Edit2: Doh, obviously `None` in this example, not `Err`.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: