Skip to content

Commit 10e3e87

Browse files
ericcurtinqwencoder
andcommitted
lib,mount: Fix type annotations and module visibility
- Make tempmount module public in bootc-mount crate so it can be imported by bootc-lib - Add type annotation for booted_bls to help type inference - Add return type annotation for closure in atomic_replace_with - Fix rustix features in bootc-mount Cargo.toml Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
1 parent 02f85d4 commit 10e3e87

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

crates/lib/src/bootc_composefs/boot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ pub(crate) fn setup_composefs_bls_boot(
730730
let (config_path, booted_bls) = if is_upgrade {
731731
let boot_dir = Dir::open_ambient_dir(&entry_paths.config_path, ambient_authority())?;
732732

733-
let mut booted_bls = get_booted_bls(&boot_dir)?;
733+
let mut booted_bls: BLSConfig = get_booted_bls(&boot_dir)?;
734734
booted_bls.sort_key = Some(secondary_sort_key(&os_id));
735735

736736
let staged_path = loader_path.join(STAGED_BOOT_LOADER_ENTRIES);

crates/lib/src/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,7 @@ fn copy_regular_file<ObjectID: FsVerityHashValue>(
20462046
// For external files, stream from the object store
20472047
let mut reader = std::fs::File::from(repo.open_object(id)?);
20482048
dest_dir
2049-
.atomic_replace_with(dest_path, |writer| {
2049+
.atomic_replace_with(dest_path, |writer| -> Result<(), std::io::Error> {
20502050
std::io::copy(&mut reader, writer)?;
20512051
Ok(())
20522052
})

crates/mount/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
mod mount;
77
pub use mount::*;
88

9-
mod tempmount;
9+
pub mod tempmount;
1010
pub use tempmount::*;

0 commit comments

Comments
 (0)