File tree Expand file tree Collapse file tree 3 files changed +4
-11
lines changed Expand file tree Collapse file tree 3 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 22name = " esp-bootloader-esp-idf"
33version = " 0.2.0"
44edition = " 2024"
5- rust-version = " 1.86 .0"
5+ rust-version = " 1.88 .0"
66description = " Functionality related to the esp-idf bootloader"
77documentation = " https://docs.espressif.com/projects/rust/esp-bootloader-esp-idf/latest/"
88keywords = [" esp32" , " espressif" , " no-std" ]
Original file line number Diff line number Diff line change 22
33[ ![ Crates.io] ( https://img.shields.io/crates/v/esp-bootloader-esp-idf?labelColor=1C2C2E&color=C96329&logo=Rust&style=flat-square )] ( https://crates.io/crates/esp-bootloader-esp-idf )
44[ ![ docs.rs] ( https://img.shields.io/docsrs/esp-bootloader-esp-idf?labelColor=1C2C2E&color=C96329&logo=rust&style=flat-square )] ( https://docs.espressif.com/projects/rust/esp-bootloader-esp-idf/latest/ )
5- ![ MSRV] ( https://img.shields.io/badge/MSRV-1.86 .0-blue?labelColor=1C2C2E&style=flat-square )
5+ ![ MSRV] ( https://img.shields.io/badge/MSRV-1.88 .0-blue?labelColor=1C2C2E&style=flat-square )
66![ Crates.io] ( https://img.shields.io/crates/l/esp-bootloader-esp-idf?labelColor=1C2C2E&style=flat-square )
77[ ![ Matrix] ( https://img.shields.io/matrix/esp-rs:matrix.org?label=join%20matrix&labelColor=1C2C2E&color=BEC5C9&logo=matrix&style=flat-square )] ( https://matrix.to/#/#esp-rs:matrix.org )
88
Original file line number Diff line number Diff line change @@ -199,7 +199,8 @@ impl<'a> PartitionTable<'a> {
199199 return Err ( Error :: Invalid ) ;
200200 }
201201
202- if binary. len ( ) % RAW_ENTRY_LEN != 0 {
202+ let ( binary, rem) = binary. as_chunks :: < RAW_ENTRY_LEN > ( ) ;
203+ if !rem. is_empty ( ) {
203204 return Err ( Error :: Invalid ) ;
204205 }
205206
@@ -210,14 +211,6 @@ impl<'a> PartitionTable<'a> {
210211 } ) ;
211212 }
212213
213- // we checked binary before
214- let binary = unsafe {
215- core:: slice:: from_raw_parts (
216- binary. as_ptr ( ) as * const [ u8 ; RAW_ENTRY_LEN ] ,
217- binary. len ( ) / RAW_ENTRY_LEN ,
218- )
219- } ;
220-
221214 let mut raw_table = Self {
222215 binary,
223216 entries : binary. len ( ) ,
You can’t perform that action at this time.
0 commit comments