Skip to content

Commit

Permalink
Eliminate unnecessary to_path call
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Mar 13, 2024
1 parent c269382 commit 36cd42c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ fn dynamic(ident: &syn::Ident, folder_path: String, prefix: Option<&str>, includ
// and check that instead if it starts with `canonical_folder_path`
// https://doc.rust-lang.org/std/path/fn.absolute.html (currently nightly)
// Should be allowed only if it was a symlink
let metadata = ::std::fs::symlink_metadata(file_path.as_path()).ok()?;
let metadata = ::std::fs::symlink_metadata(&file_path).ok()?;
if !metadata.is_symlink() {
return ::std::option::Option::None;
}
Expand Down

0 comments on commit 36cd42c

Please sign in to comment.