From a5749a5d8d38b0db2ce5548473f8a61b674578a6 Mon Sep 17 00:00:00 2001 From: namilsk Date: Sat, 31 Jan 2026 21:26:26 +0300 Subject: Started writing service-utils and adding docstrings --- init/src/mounts/rescue.rs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'init/src/mounts/rescue.rs') diff --git a/init/src/mounts/rescue.rs b/init/src/mounts/rescue.rs index 2238297..385f851 100644 --- a/init/src/mounts/rescue.rs +++ b/init/src/mounts/rescue.rs @@ -13,10 +13,10 @@ fn check_mount_point_permissions(path: &str) -> Result<(), Box Result<(), Box> { // let source_c = source.map(|s| CString::new(s).map_err(|e| )); let source_c = match source { Some(s) => match CString::new(s) { - Ok(c_string) => Some(c_string), + Ok(c_string) => Some(c_string), Err(null_err) => { - log_warning(&format!("Source string contains NULL bytes (\\0), skipping: {}", null_err)); - continue; - } - }, - None => None - }; - + log_warning(&format!( + "Source string contains NULL bytes (\\0), skipping: {}", + null_err + )); + continue; + } + }, + None => None, + }; let source_ptr = source_c.as_ref().map_or(std::ptr::null(), |s| s.as_ptr()); -- cgit v1.2.3