Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazariglez committed Jun 16, 2024
1 parent d6dd997 commit a6ca3af
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions crates/notan_app/src/parsers/audio.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "audio")]

use crate::assets::AssetLoader;
use crate::App;
use notan_audio::AudioSource;
Expand Down
2 changes: 1 addition & 1 deletion crates/notan_draw/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fn process_glyphs(
) {
if let Some(indices) = &draw.text_batch_indices {
let batch_len = draw.batches.len();
let mut last_index = std::usize::MAX;
let mut last_index = usize::MAX;
indices.iter().for_each(|i| {
let n = *i;
if n == last_index {
Expand Down
1 change: 0 additions & 1 deletion crates/notan_graphics/src/to_file.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![cfg(feature = "texture_to_file")]
use crate::Device;
use crate::Texture;
use image::ColorType;
Expand Down
2 changes: 1 addition & 1 deletion crates/notan_macro/src/shaders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ pub fn read_spirv<R: io::Read + io::Seek>(mut x: R) -> io::Result<Vec<u32>> {
"input length not divisible by 4",
));
}
if size > usize::max_value() as u64 {
if size > usize::MAX as u64 {
return Err(io::Error::new(io::ErrorKind::InvalidData, "input too long"));
}
let words = (size / 4) as usize;
Expand Down
2 changes: 0 additions & 2 deletions crates/notan_utils/src/save_file.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "save_file")]

use std::path::Path;

#[cfg(not(target_arch = "wasm32"))]
Expand Down

0 comments on commit a6ca3af

Please sign in to comment.