Clippy fixes
This commit is contained in:
parent
ab943ab747
commit
9f547de769
@ -42,8 +42,8 @@ fn read_stdin() -> InputData {
|
||||
(0..corner_count)
|
||||
.map(|idx| {
|
||||
(
|
||||
(numbers[idx * 2 + 1] as f32).into(),
|
||||
(numbers[idx * 2 + 2] as f32).into(),
|
||||
numbers[idx * 2 + 1] as f32,
|
||||
numbers[idx * 2 + 2] as f32,
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
@ -57,7 +57,7 @@ fn read_stdin() -> InputData {
|
||||
.unwrap()
|
||||
.trim()
|
||||
.split(' ')
|
||||
.map(|x| x.parse::<f32>().unwrap().into())
|
||||
.map(|x| x.parse::<f32>().unwrap())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
InputData {
|
||||
|
@ -298,9 +298,7 @@ lazy_static! {
|
||||
fn none_intersect(mut line: Line) -> bool {
|
||||
// Linie normalisieren
|
||||
if line.start.y > line.end.y || (line.start.y == line.end.y && line.start.x > line.end.x) {
|
||||
let end = line.start;
|
||||
line.start = line.end;
|
||||
line.end = end;
|
||||
std::mem::swap(&mut line.start, &mut line.end);
|
||||
}
|
||||
// Cache laden
|
||||
let mut collisions = COLLISIONS.write().unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user