diff --git a/src/astc.rs b/src/astc.rs index 2c88e5a..feeeb93 100644 --- a/src/astc.rs +++ b/src/astc.rs @@ -151,7 +151,7 @@ pub fn compress_blocks_into(settings: &EncodeSettings, surface: &RgbaSurface, bl let program_count = unsafe { kernel_astc::get_programCount() as u32 }; let mut block_scores = - vec![std::f32::INFINITY; (tex_width * surface.height / settings.block_height) as usize]; + vec![f32::INFINITY; (tex_width * surface.height / settings.block_height) as usize]; let mode_list_size = 3334usize; let list_size = program_count as usize; diff --git a/src/etc1.rs b/src/etc1.rs index fec149c..81ddc03 100644 --- a/src/etc1.rs +++ b/src/etc1.rs @@ -13,14 +13,14 @@ pub fn calc_output_size(width: u32, height: u32) -> usize { block_count as usize * 8 } -pub fn compress_blocks(settings: EncodeSettings, surface: &RgbaSurface) -> Vec { +pub fn compress_blocks(settings: &EncodeSettings, surface: &RgbaSurface) -> Vec { let output_size = calc_output_size(surface.width, surface.height); let mut output = vec![0u8; output_size]; compress_blocks_into(settings, surface, &mut output); output } -pub fn compress_blocks_into(settings: EncodeSettings, surface: &RgbaSurface, blocks: &mut [u8]) { +pub fn compress_blocks_into(settings: &EncodeSettings, surface: &RgbaSurface, blocks: &mut [u8]) { assert_eq!( blocks.len(), calc_output_size(surface.width, surface.height)