Clippy fixes

This commit is contained in:
Arne Keller 2019-04-04 15:21:56 +02:00
parent ab943ab747
commit 9f547de769
2 changed files with 4 additions and 6 deletions

View File

@ -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 {

View File

@ -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();