Skip to content

Commit

Permalink
Merge pull request #250 from hamirmahal/refactor/remove-redundant-ref…
Browse files Browse the repository at this point in the history
…erence-and-closure

refactor: remove redundant reference and closure
  • Loading branch information
pyrossh authored Oct 14, 2024
2 parents edeab18 + 5502635 commit 0f77282
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ fn impl_rust_embed(ast: &syn::DeriveInput) -> syn::Result<TokenStream2> {

let crate_path: syn::Path = find_attribute_values(ast, "crate_path")
.last()
.map(|v| syn::parse_str(&v).unwrap())
.map(|v| syn::parse_str(v).unwrap())
.unwrap_or_else(|| syn::parse_str("rust_embed").unwrap());

let mut folder_paths = find_attribute_values(ast, "folder");
Expand Down
2 changes: 1 addition & 1 deletion utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn get_files(folder_path: String, matcher: PathMatcher) -> impl Iterator<Ite
.follow_links(true)
.sort_by_file_name()
.into_iter()
.filter_map(|e| e.ok())
.filter_map(std::result::Result::ok)
.filter(|e| e.file_type().is_file())
.filter_map(move |e| {
let rel_path = path_to_str(e.path().strip_prefix(&folder_path).unwrap());
Expand Down

0 comments on commit 0f77282

Please sign in to comment.