Skip to content

Commit f802a03

Browse files
committed
thanks clippy
1 parent a89a667 commit f802a03

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

git-repository/src/config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,10 @@ mod cache {
142142
std::env::var_os("XDG_CONFIG_HOME")
143143
.map(|path| (path, &self.xdg_config_home_env))
144144
.or_else(|| std::env::var_os("HOME").map(|path| (path, &self.home_env)))
145-
.map(|(base, permission)| {
145+
.and_then(|(base, permission)| {
146146
let resource = std::path::PathBuf::from(base).join("git").join(resource_file_name);
147147
permission.check(resource).transpose()
148148
})
149-
.flatten()
150149
.transpose()
151150
}
152151
}

git-sec/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl Permission {
153153
Permission::Deny => Ok(None),
154154
Permission::Forbid => Err(permission::Error {
155155
resource,
156-
permission: self.clone(),
156+
permission: *self,
157157
}),
158158
}
159159
}

0 commit comments

Comments
 (0)