clippy fixes

This commit is contained in:
Vinzenz Schroeter 2024-11-23 19:55:35 +01:00
parent 666a0e6c01
commit d5c4c61083

View file

@ -89,7 +89,7 @@ impl CharGrid {
self.actual self.actual
.write() .write()
.unwrap() .unwrap()
.set_row(y as usize, &*row.chars().collect::<Vec<_>>()) .set_row(y as usize, &row.chars().collect::<Vec<_>>())
.map_err(CharGridError::from) .map_err(CharGridError::from)
} }
@ -97,7 +97,7 @@ impl CharGrid {
self.actual self.actual
.write() .write()
.unwrap() .unwrap()
.set_row(x as usize, &*col.chars().collect::<Vec<_>>()) .set_row(x as usize, &col.chars().collect::<Vec<_>>())
.map_err(CharGridError::from) .map_err(CharGridError::from)
} }
@ -106,7 +106,7 @@ impl CharGrid {
.read() .read()
.unwrap() .unwrap()
.get_row(y as usize) .get_row(y as usize)
.map(move |vec| String::from_iter(vec)) .map(String::from_iter)
.ok_or(CharGridError::OutOfBounds {index: y, size: self.height()}) .ok_or(CharGridError::OutOfBounds {index: y, size: self.height()})
} }
@ -115,7 +115,7 @@ impl CharGrid {
.read() .read()
.unwrap() .unwrap()
.get_col(x as usize) .get_col(x as usize)
.map(move |vec| String::from_iter(vec)) .map(String::from_iter)
.ok_or(CharGridError::OutOfBounds {index: x, size: self.width()}) .ok_or(CharGridError::OutOfBounds {index: x, size: self.width()})
} }