diff --git a/crates/notan_app/src/parsers/audio.rs b/crates/notan_app/src/parsers/audio.rs index ca47184a..6f07feb7 100644 --- a/crates/notan_app/src/parsers/audio.rs +++ b/crates/notan_app/src/parsers/audio.rs @@ -1,5 +1,3 @@ -#![cfg(feature = "audio")] - use crate::assets::AssetLoader; use crate::App; use notan_audio::AudioSource; diff --git a/crates/notan_draw/src/manager.rs b/crates/notan_draw/src/manager.rs index 5b920c1a..6cb7d159 100644 --- a/crates/notan_draw/src/manager.rs +++ b/crates/notan_draw/src/manager.rs @@ -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 { diff --git a/crates/notan_graphics/src/to_file.rs b/crates/notan_graphics/src/to_file.rs index f4535a86..a4032371 100644 --- a/crates/notan_graphics/src/to_file.rs +++ b/crates/notan_graphics/src/to_file.rs @@ -1,4 +1,3 @@ -#![cfg(feature = "texture_to_file")] use crate::Device; use crate::Texture; use image::ColorType; diff --git a/crates/notan_macro/src/shaders.rs b/crates/notan_macro/src/shaders.rs index 5caf8e2e..c9f784b6 100644 --- a/crates/notan_macro/src/shaders.rs +++ b/crates/notan_macro/src/shaders.rs @@ -262,7 +262,7 @@ pub fn read_spirv(mut x: R) -> io::Result> { "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; diff --git a/crates/notan_utils/src/save_file.rs b/crates/notan_utils/src/save_file.rs index dd707799..8771037b 100644 --- a/crates/notan_utils/src/save_file.rs +++ b/crates/notan_utils/src/save_file.rs @@ -1,5 +1,3 @@ -#![cfg(feature = "save_file")] - use std::path::Path; #[cfg(not(target_arch = "wasm32"))]