Skip to content

Commit 137794d

Browse files
committed
thanks clippy
1 parent 07d16ea commit 137794d

3 files changed

Lines changed: 3 additions & 9 deletions

File tree

gitoxide-core/src/repository/fetch.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ pub(crate) mod function {
9393
if negotiation_info {
9494
print_negotiate_info(&mut out, negotiate.as_ref())?;
9595
}
96-
if let Some((negotiate, path)) =
97-
open_negotiation_graph.and_then(|path| negotiate.as_ref().map(|n| (n, path)))
98-
{
96+
if let Some((negotiate, path)) = negotiate.as_ref().zip(open_negotiation_graph) {
9997
render_graph(&repo, &negotiate.graph, &path, progress)?;
10098
}
10199
Ok::<_, anyhow::Error>(())

gix/src/clone/fetch/util.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,7 @@ pub(super) fn find_custom_refname<'a>(
197197
let filtered_items: Vec<_> = ref_map
198198
.mappings
199199
.iter()
200-
.filter_map(|m| {
201-
m.remote
202-
.as_name()
203-
.and_then(|name| m.remote.as_id().map(|id| (name, id)))
204-
})
200+
.filter_map(|m| m.remote.as_name().zip(m.remote.as_id()))
205201
.map(|(full_ref_name, target)| gix_refspec::match_group::Item {
206202
full_ref_name,
207203
target,

gix/src/repository/config/transport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ impl crate::Repository {
388388
trusted_only,
389389
lenient,
390390
)
391-
.map(|max| min.and_then(|min| max.map(|max| (min, max))))
391+
.map(|max| min.zip(max))
392392
})?;
393393
if let Some((min, max)) = min_max {
394394
let v = opts.ssl_version.get_or_insert(SslVersionRangeInclusive {

0 commit comments

Comments
 (0)