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