Improvements prompted by clippy, and disable one lint
- May 11, 2022
-
-
Ian Jackson authored
The type of ret.map_err(codec_err_to_chan)? is (). ISTM that writing `let () = ` makes it clear that there is nothing there, but the lint forbids this. This lint is warn by default and trips here for me on current nightly. It seems wrong to me. We should be able to make it clear to the reader that there is nothing here - note how this differs from the lines below where Ready contains msg. A let () binding is a good way to do that. I think the lint allow ought to be added everywhere, but that doesn't seem easy right now - see this issue about maint/add_warning: tpo/core/arti#469
-
Ian Jackson authored
This does involve unwrap, but of course that can't fail unless the formats fail, which would already panic (that's implied by format!).
-
Ian Jackson authored
-