refactor(utils/os): Optimize Windows OS utilities and add safety comments (#1671)

Co-authored-by: weisd <weishidavip@163.com>
This commit is contained in:
houseme
2026-01-30 16:13:42 +08:00
committed by GitHub
parent dce117840c
commit 90ed75a3dc
10 changed files with 347 additions and 240 deletions
+4 -9
View File
@@ -5730,16 +5730,11 @@ impl StorageAPI for SetDisks {
return Err(Error::other("checksum type not found"));
};
if let Some(want) = &opts.want_checksum
&& !want
.checksum_type
.is(rustfs_rio::ChecksumType::from_string_with_obj_type(cs, ct))
checksum_type = rustfs_rio::ChecksumType::from_string_with_obj_type(cs, ct);
if let Some(want) = opts.want_checksum.as_ref()
&& !want.checksum_type.is(checksum_type)
{
return Err(Error::other(format!(
"checksum type mismatch, got {:?}, want {:?}",
want,
rustfs_rio::ChecksumType::from_string_with_obj_type(cs, ct)
)));
return Err(Error::other(format!("checksum type mismatch, got {:?}, want {:?}", want, checksum_type)));
}
}