rust-toolchain: 1.70 -> 1.75

This commit is contained in:
nikstur 2024-01-21 15:29:38 +01:00
parent 50247a6890
commit 234e4da1f3
3 changed files with 3 additions and 4 deletions

View File

@ -195,7 +195,7 @@ impl Image {
self.image.len().try_into().unwrap(),
);
loaded_image.set_load_options(
load_options.as_ptr() as *const u8,
load_options.as_ptr(),
u32::try_from(load_options.len()).unwrap(),
);
}

View File

@ -1,4 +1,4 @@
[toolchain]
channel = "1.70.0"
channel = "1.75.0"
components = [ "rust-src" ]
targets = [ "x86_64-unknown-uefi", "aarch64-unknown-uefi" ]

View File

@ -9,8 +9,7 @@ use linux_bootloader::uefi_helpers::booted_image_file;
pub fn extract_bytes(pe_data: &[u8], section: &str) -> Result<Vec<u8>> {
let bytes: Vec<u8> = pe_section(pe_data, section)
.ok_or(Status::INVALID_PARAMETER)?
.try_into()
.map_err(|_| Status::INVALID_PARAMETER)?;
.into();
Ok(bytes)
}