Enable more warnings, fix a couple of them

Yay for a high quality compiler
This commit is contained in:
2024-04-27 11:16:31 -05:00
parent 8e37fd8e97
commit f2d1a892b7
2 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
#![warn(clippy::all, rust_2018_idioms, rust_2018_compatibility)]
use rustpt::primitives::{
Vec2i,
Vec3,

View File

@@ -101,7 +101,7 @@ where T: std::ops::Div<Output = T>{
impl <T> Display for Vec2<T>
where T: Display { // nested type still needs to have Display
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
let str = format!("{} {}", self.x, self.y);
fmt.write_str(&str)
}
@@ -370,7 +370,7 @@ impl Neg for Vec3{
}
impl Display for Vec3 {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
let str = format!("{} {} {}", self.x, self.y, self.z);
fmt.write_str(&str)?;
Ok(())