Skip to content

Commit

Permalink
Fix some clippy warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Feb 3, 2023
1 parent 53b4154 commit b5f68ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cap-primitives/src/windows/fs/dir_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub(crate) fn open_ambient_dir_impl(path: &Path, _: AmbientAuthority) -> io::Res
.read(true)
.custom_flags(FILE_FLAG_BACKUP_SEMANTICS)
.share_mode(FILE_SHARE_READ | FILE_SHARE_WRITE)
.open(&path)?;
.open(path)?;

// Require a directory. It may seem possible to eliminate this `metadata()`
// call by appending a slash to the path before opening it so that the OS
Expand Down
4 changes: 2 additions & 2 deletions cap-primitives/src/windows/fs/open_unchecked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub(crate) fn open_unchecked(
let manually_trunc = prepare_open_options_for_open(&mut prepared_opts);

handle_open_result(
open_at(&start, path, &prepared_opts),
open_at(start, path, &prepared_opts),
options,
manually_trunc,
)
Expand Down Expand Up @@ -143,7 +143,7 @@ pub(crate) fn open_ambient_impl(
) -> Result<fs::File, OpenUncheckedError> {
let _ = ambient_authority;
let (std_opts, manually_trunc) = open_options_to_std(options);
handle_open_result(std_opts.open(path), &options, manually_trunc)
handle_open_result(std_opts.open(path), options, manually_trunc)
}

fn handle_open_result(
Expand Down

0 comments on commit b5f68ba

Please sign in to comment.