Skip to content

Commit

Permalink
Fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-mcdaniel committed Feb 6, 2024
1 parent 4b32043 commit 172b0ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/binary/init/fs_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ use dune::{Environment, Error, Expression};
fn get_dir_tree(cwd: &Path, max_depth: Option<Int>) -> BTreeMap<String, Expression> {
let mut dir_tree = b_tree_map! {};

dir_tree.insert(
".".to_string(),
Expression::from(cwd.to_str().unwrap()),
);
dir_tree.insert(".".to_string(), Expression::from(cwd.to_str().unwrap()));
dir_tree.insert(
"..".to_string(),
Expression::from(cwd.parent().unwrap().to_str().unwrap()),
Expand Down
6 changes: 1 addition & 5 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ where

impl From<Environment> for Expression {
fn from(env: Environment) -> Self {
Self::Map(
env.bindings
.into_iter()
.collect::<BTreeMap<String, Self>>(),
)
Self::Map(env.bindings.into_iter().collect::<BTreeMap<String, Self>>())
}
}

Expand Down

0 comments on commit 172b0ce

Please sign in to comment.