diff --git a/.cargo/config b/.cargo/config.toml similarity index 100% rename from .cargo/config rename to .cargo/config.toml diff --git a/src/turing_pi.rs b/src/turing_pi.rs index 4abdb87..2ebd6da 100644 --- a/src/turing_pi.rs +++ b/src/turing_pi.rs @@ -55,7 +55,7 @@ pub fn setup_initramfs() -> anyhow::Result<()> { match result { // Ignore EBUSY, which indicates that the mountpoint is already mounted. - Err(errno) if errno == Errno::EBUSY => (), + Err(Errno::EBUSY) => (), r => r?, }; } diff --git a/src/ubi/format.rs b/src/ubi/format.rs index 40ee280..23c7ac7 100644 --- a/src/ubi/format.rs +++ b/src/ubi/format.rs @@ -287,7 +287,7 @@ where // Begin ubinizing volumes let mut ubinizer = Ubinizer::new(volumes, eb_size); let vid_size = layout.bytes_per_page; - let mut data = Vec::with_capacity(u32::try_from(eb_size).unwrap() as usize + vid_size); + let mut data = Vec::with_capacity(u32::from(eb_size) as usize + vid_size); data.resize(vid_size, 0u8); // Iterate over all logical blocks provided by the Ubinizer