← Back to context

Comment by brabel

5 years ago

If you're not going to use the success value, you can ignore errors in Rust easily:

    let _ = something_returning_Result();

This does not even give a warning.

> This does not even give a warning.

Just to clarify: the "let _ = ..." construct is the explicit way of suppressing the warning in Rust. You acknowledge that there is indeed a return value but you choose to ignore it. Just calling the function without explicitly discarding the Result will give you a warning.