Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/uu/sync/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ mod platform {
use windows_sys::Win32::System::WindowsProgramming::DRIVE_FIXED;

fn get_last_error() -> u32 {
// SAFETY: GetLastError has no safety preconditions
// SAFETY: `GetLastError` has no safety preconditions
unsafe { GetLastError() as u32 }
}

Expand Down Expand Up @@ -122,8 +122,6 @@ mod platform {
Ok((String::from_wide_null(&name), handle))
}

/// # Safety
/// This function is unsafe because it calls an unsafe function.
fn find_all_volumes() -> UResult<Vec<String>> {
let (first_volume, next_volume_handle) = find_first_volume()?;
let mut volumes = vec![first_volume];
Expand All @@ -136,7 +134,7 @@ mod platform {
{
return match get_last_error() {
ERROR_NO_MORE_FILES => {
// SAFETY: next_volume_handle was returned by `find_first_volume`
// SAFETY: `next_volume_handle` was returned by `find_first_volume`
unsafe { FindVolumeClose(next_volume_handle) };
Ok(volumes)
}
Expand Down
Loading