Open
Description
I have code that looks like this:
let img_x: u32;
let img_y: u32;
let pattern_x: u32;
let pattern_y: u32;
if forward {
img_x = start_x + scan_x;
img_y = start_y + scan_y;
pattern_x = scan_x;
pattern_y = scan_y;
} else {
img_x = start_x - scan_x;
img_y = start_y - scan_y;
pattern_x = scan_width - scan_x - 1;
pattern_y = scan_height - scan_y - 1;
}
Am I right in thinking that this should be ok with clippy or is there actually a more idiomatic way of doing something like this?
If people agree with me, I'll fix the bug.
Metadata
Metadata
Assignees
Labels
No labels