Skip to content

Commit 8e96ed3

Browse files
committed
thanks clippy
1 parent 2efce72 commit 8e96ed3

File tree

131 files changed

+272
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+272
-268
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ bin-dir = "gitoxide-max-pure-v{ version }-{ target }/{ bin }{ binary-ext }"
325325
pedantic = { level = "warn", priority = -1 }
326326
#
327327
# Reviewed and allowed lints
328+
needless_continue = "allow"
328329
enum_glob_use = "allow" # x97
329330
missing_errors_doc = "allow" # x1792
330331
missing_panics_doc = "allow" # x447

gitoxide-core/src/hours/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ where
180180
break;
181181
}
182182
Err(err) => return Err(err.into()),
183-
};
183+
}
184184
}
185185
if let Some(tx) = tx_tree_id {
186186
tx.send(chunk).ok();

gitoxide-core/src/index/information.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,16 @@ mod serde_only {
9292
});
9393
if f.link().is_some() {
9494
names.push("link");
95-
};
95+
}
9696
if f.resolve_undo().is_some() {
9797
names.push("resolve-undo (REUC)");
98-
};
98+
}
9999
if f.untracked().is_some() {
100100
names.push("untracked (UNTR)");
101-
};
101+
}
102102
if f.fs_monitor().is_some() {
103103
names.push("fs-monitor (FSMN)");
104-
};
104+
}
105105
if f.had_offset_table() {
106106
names.push("offset-table (IEOT)");
107107
}

gitoxide-core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub use discover::discover;
8686
pub fn env(mut out: impl std::io::Write, format: OutputFormat) -> anyhow::Result<()> {
8787
if format != OutputFormat::Human {
8888
bail!("JSON output isn't supported");
89-
};
89+
}
9090

9191
let width = 15;
9292
writeln!(

gitoxide-core/src/pack/explode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ pub fn pack_or_pack_index(
161161
)
162162
})?;
163163

164-
if !object_path.as_ref().map_or(true, |p| p.as_ref().is_dir()) {
164+
if !object_path.as_ref().is_none_or(|p| p.as_ref().is_dir()) {
165165
return Err(anyhow!(
166166
"The object directory at '{}' is inaccessible",
167167
object_path

gitoxide-core/src/pack/index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub fn from_pack(
114114
OutputFormat::Human => drop(human_output(out, res)),
115115
#[cfg(feature = "serde")]
116116
OutputFormat::Json => serde_json::to_writer_pretty(out, &res)?,
117-
};
117+
}
118118
Ok(())
119119
}
120120

gitoxide-core/src/pack/receive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,6 @@ fn receive_pack_blocking(
306306
OutputFormat::Json => {
307307
serde_json::to_writer_pretty(&mut out, &JsonOutcome::from_outcome_and_refs(outcome, refs))?;
308308
}
309-
};
309+
}
310310
Ok(())
311311
}

gitoxide-core/src/pack/verify.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ where
177177
#[cfg(feature = "serde")]
178178
Some(OutputFormat::Json) => serde_json::to_writer_pretty(out, &multi_index.index_names().iter().zip(res.pack_traverse_statistics).collect::<Vec<_>>())?,
179179
_ => {}
180-
};
180+
}
181181
return Ok(())
182182
},
183183
_ => return Err(anyhow!(
@@ -195,7 +195,7 @@ where
195195
#[cfg(feature = "serde")]
196196
Some(OutputFormat::Json) => serde_json::to_writer_pretty(out, stats)?,
197197
_ => {}
198-
};
198+
}
199199
}
200200
Ok(())
201201
}

gitoxide-core/src/query/engine/update.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ pub fn update(
447447
break;
448448
}
449449
Err(err) => return Err(err.into()),
450-
};
450+
}
451451
}
452452
db.send_last_chunk();
453453
let saw_new_commits = !commits.is_empty();

gitoxide-core/src/repository/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub(crate) mod function {
213213
continue;
214214
}
215215
}
216-
};
216+
}
217217

218218
let is_ignored = matches!(entry.status, gix::dir::entry::Status::Ignored(_));
219219
let entry_path = gix::path::from_bstr(entry.rela_path);

0 commit comments

Comments
 (0)