deepsourcestatus / test-repository

Found if block with identical else block RS-W1008
Bug risk
Minor
6 months ago6 months old
Found if/else with the same bodies
131{
132    pub fn new(width: u32, height: u32) -> Self {
133        let data = vec![Default::default(); (width * height) as usize];
134        if data == [] {135            Pixmap {136                width,137                height,138                data,139            }140        } else {141            Pixmap {142                width,143                height,144                data,145            }146        }147    }
148
149    pub fn new_with(width: u32, height: u32, data: Vec<T>) -> Self {