Skip to content

Commit

Permalink
Merge pull request #239 from smoelius/patch-1
Browse files Browse the repository at this point in the history
Eliminate unnecessary `to_path` call
  • Loading branch information
pyrossh authored Mar 13, 2024
2 parents c269382 + 36cd42c commit f7c7268
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 f7c7268

Please sign in to comment.