Skip to content

Make clippy happier

Lukáš Tyrychtr requested to merge tyrylu/librsvg:happier_clippy into main

This addresses all clippy warnings except the following:

   --> src/font_props.rs:110:13
    |
110 | /             if opt.is_some() {
111 | |                 1
112 | |             } else {
113 | |                 0
114 | |             }
    | |_____________^ help: replace with from: `u8::from(opt.is_some())`
    |
    = note: `#[warn(clippy::bool_to_int_with_if)]` on by default
    = note: `opt.is_some() as u8` or `opt.is_some().into()` can also be valid options
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_to_int_with_if

Replacing this is likely trivial, but questionable...

Edited by Jordan Petridis

Merge request reports