Skip to content

Commit

Permalink
fix(clippy): windows
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed Oct 16, 2023
1 parent f6f5c40 commit 12624bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/fs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use std::{io, os, path::Path};
use std::{io, path::Path};

/// Create a symlink to a directory.
///
/// The `link` path will be a symbolic link pointing to `original`.
pub fn symlink_dir(original: &Path, link: &Path) -> io::Result<()> {
#[cfg(unix)]
return os::unix::fs::symlink(original, link);
return std::os::unix::fs::symlink(original, link);
#[cfg(windows)]
return junction::create(original, link); // junctions instead of symlinks because symlinks may require elevated privileges.
}

0 comments on commit 12624bf

Please sign in to comment.