Skip to content

Commit f992fb7

Browse files
authored
Merge pull request #1546 from nyurik/semilocons
Add missing semicolons
2 parents 7df1d03 + ec69c88 commit f992fb7

File tree

170 files changed

+296
-296
lines changed

Some content is hidden

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

170 files changed

+296
-296
lines changed

examples/log.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn run(args: Args) -> anyhow::Result<()> {
158158
if args.reverse {
159159
let mut results: Vec<_> = log_iter.collect();
160160
results.reverse();
161-
log_iter = Box::new(results.into_iter())
161+
log_iter = Box::new(results.into_iter());
162162
}
163163

164164
let mut log_iter = log_iter

gitoxide-core/src/corpus/engine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl Engine {
100100
}
101101
repo_progress.info(format!("with {} tasks", tasks.len()));
102102
for (_, task) in tasks {
103-
repo_progress.info(format!("task '{}' ({})", task.description, task.short_name))
103+
repo_progress.info(format!("task '{}' ({})", task.description, task.short_name));
104104
}
105105
break 'tasks_loop;
106106
}

gitoxide-core/src/corpus/run.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl Task {
1919
) {
2020
let start = std::time::Instant::now();
2121
if let Err(err) = self.execute.execute(repo, progress, threads, should_interrupt) {
22-
run.error = Some(format!("{err:#?}"))
22+
run.error = Some(format!("{err:#?}"));
2323
}
2424
run.duration = start.elapsed();
2525
}

gitoxide-core/src/hours/core.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ pub fn estimate_hours(
3333
for next in commits {
3434
let change_in_minutes = (next.time.seconds.saturating_sub(cur.time.seconds)) as f32 / MINUTES_PER_HOUR;
3535
if change_in_minutes < MAX_COMMIT_DIFFERENCE_IN_MINUTES {
36-
hours += change_in_minutes / MINUTES_PER_HOUR
36+
hours += change_in_minutes / MINUTES_PER_HOUR;
3737
} else {
38-
hours += FIRST_COMMIT_ADDITION_IN_MINUTES / MINUTES_PER_HOUR
38+
hours += FIRST_COMMIT_ADDITION_IN_MINUTES / MINUTES_PER_HOUR;
3939
}
4040
cur = next;
4141
}

gitoxide-core/src/hours/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ where
170170
.send(std::mem::replace(&mut chunk, Vec::with_capacity(CHUNK_SIZE)))
171171
.ok();
172172
} else {
173-
chunk.push((commit_idx, first_parent, commit))
173+
chunk.push((commit_idx, first_parent, commit));
174174
}
175175
}
176176
commit_idx += 1;

gitoxide-core/src/index/information.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ mod serde_only {
103103
names.push("fs-monitor (FSMN)");
104104
};
105105
if f.had_offset_table() {
106-
names.push("offset-table (IEOT)")
106+
names.push("offset-table (IEOT)");
107107
}
108108
if f.had_end_of_index_marker() {
109-
names.push("end-of-index (EOIE)")
109+
names.push("end-of-index (EOIE)");
110110
}
111111
Extensions { names, tree }
112112
},

gitoxide-core/src/pack/create.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ where
259259
pack::data::output::bytes::FromEntriesIter::new(
260260
in_order_entries.by_ref().inspect(|e| {
261261
if let Ok(entries) = e {
262-
entries_progress.inc_by(entries.len())
262+
entries_progress.inc_by(entries.len());
263263
}
264264
}),
265265
&mut pack_file,

gitoxide-core/src/pack/receive.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<W> protocol::fetch::DelegateBlocking for CloneDelegate<W> {
105105
}
106106
} else {
107107
for r in &self.wanted_refs {
108-
arguments.want_ref(r.as_ref())
108+
arguments.want_ref(r.as_ref());
109109
}
110110
}
111111
Ok(Action::Cancel)
@@ -408,7 +408,7 @@ fn receive_pack_blocking<W: io::Write>(
408408
OutputFormat::Human => drop(print(&mut ctx.out, outcome, refs)),
409409
#[cfg(feature = "serde")]
410410
OutputFormat::Json => {
411-
serde_json::to_writer_pretty(&mut ctx.out, &JsonOutcome::from_outcome_and_refs(outcome, refs))?
411+
serde_json::to_writer_pretty(&mut ctx.out, &JsonOutcome::from_outcome_and_refs(outcome, refs))?;
412412
}
413413
};
414414
Ok(())

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ pub fn update(
315315
out_chunk.push(CommitDiffStats {
316316
id: commit,
317317
changes: Vec::new(),
318-
})
318+
});
319319
}
320320
}
321321
if tx_stats.send(Ok((chunk_id, out_chunk))).is_err() {
@@ -500,7 +500,7 @@ fn remove_lines(out: &mut Vec<FileChange>, path: &BStr, lines_counter: &AtomicUs
500500
mode: FileMode::Removed,
501501
source_relpath: None,
502502
lines: Some(lines),
503-
})
503+
});
504504
}
505505
}
506506

gitoxide-core/src/repository/attributes/validate_baseline.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ pub(crate) mod function {
215215
actual: matches.iter().map(|m| m.assignment.to_owned()).collect(),
216216
expected,
217217
},
218-
))
218+
));
219219
}
220220
}
221221
}
@@ -228,7 +228,7 @@ pub(crate) mod function {
228228
actual: match_.map(Into::into),
229229
expected: location,
230230
},
231-
))
231+
));
232232
}
233233
}
234234
}

gitoxide-core/src/repository/index/entries.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ pub(crate) mod function {
227227
to_human_simple(out, &index, entry, attrs, prefix)
228228
} else {
229229
to_human(out, &index, entry, attrs, prefix)
230-
}?
230+
}?;
231231
}
232232
#[cfg(feature = "serde")]
233233
OutputFormat::Json => to_json(out, &index, entry, attrs, entries.peek().is_none(), prefix)?,

gitoxide-core/src/repository/index/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub fn from_list(
6161
gix::index::entry::Flags::empty(),
6262
gix::index::entry::Mode::FILE,
6363
gix::path::to_unix_separators_on_windows(path).as_ref(),
64-
)
64+
);
6565
}
6666
index.sort_entries();
6767

gitoxide-core/src/repository/odb.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub fn statistics(
128128
match item {
129129
find::Header::Loose { size, kind } => {
130130
self.loose_objects += 1;
131-
self.count(kind, size)
131+
self.count(kind, size);
132132
}
133133
find::Header::Packed(packed) => {
134134
self.packed_objects += 1;

gitoxide-core/src/repository/revision/explain.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ impl<'a> delegate::Kind for Explain<'a> {
218218
impl<'a> Delegate for Explain<'a> {
219219
fn done(&mut self) {
220220
if !self.has_implicit_anchor && self.ref_name.is_none() && self.oid_prefix.is_none() {
221-
self.err = Some("Incomplete specification lacks its anchor, like a reference or object name".into())
221+
self.err = Some("Incomplete specification lacks its anchor, like a reference or object name".into());
222222
}
223223
}
224224
}

gitoxide-core/src/repository/tree.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ mod entries {
8080
}
8181

8282
fn pop_path_component(&mut self) {
83-
self.pop_element()
83+
self.pop_element();
8484
}
8585

8686
fn visit_tree(&mut self, _entry: &EntryRef<'_>) -> Action {

gix-attributes/src/search/attributes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl Search {
6363
let last = self.patterns.last_mut().expect("just added");
6464
if !allow_macros {
6565
last.patterns
66-
.retain(|p| !matches!(p.value, Value::MacroAssignments { .. }))
66+
.retain(|p| !matches!(p.value, Value::MacroAssignments { .. }));
6767
}
6868
collection.update_from_list(last);
6969
}
@@ -84,7 +84,7 @@ impl Search {
8484
let last = self.patterns.last_mut().expect("just added");
8585
if !allow_macros {
8686
last.patterns
87-
.retain(|p| !matches!(p.value, Value::MacroAssignments { .. }))
87+
.retain(|p| !matches!(p.value, Value::MacroAssignments { .. }));
8888
}
8989
collection.update_from_list(last);
9090
}

gix-attributes/src/search/outcome.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ impl Outcome {
2626
for (order, macro_attributes) in collection.iter().filter_map(|(_, meta)| {
2727
(!meta.macro_attributes.is_empty()).then_some((meta.id.0, &meta.macro_attributes))
2828
}) {
29-
self.matches_by_id[order].macro_attributes.clone_from(macro_attributes)
29+
self.matches_by_id[order].macro_attributes.clone_from(macro_attributes);
3030
}
3131

3232
for (name, id) in self.selected.iter_mut().filter(|(_, id)| id.is_none()) {
33-
*id = collection.name_to_meta.get(name.as_str()).map(|meta| meta.id)
33+
*id = collection.name_to_meta.get(name.as_str()).map(|meta| meta.id);
3434
}
3535
}
3636
self.reset();
@@ -46,7 +46,7 @@ impl Outcome {
4646
collection: &MetadataCollection,
4747
attribute_names: impl IntoIterator<Item = impl Into<KStringRef<'a>>>,
4848
) {
49-
self.initialize_with_selection_inner(collection, &mut attribute_names.into_iter().map(Into::into))
49+
self.initialize_with_selection_inner(collection, &mut attribute_names.into_iter().map(Into::into));
5050
}
5151

5252
fn initialize_with_selection_inner(

gix-attributes/tests/search/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ fn size_of_outcome() {
272272
std::mem::size_of::<Outcome>(),
273273
840,
274274
"it's quite big, shouldn't change without us noticing"
275-
)
275+
);
276276
}
277277

278278
fn by_name(assignments: Vec<AssignmentRef>) -> BTreeMap<NameRef, StateRef> {

gix-bitmap/src/ewah.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn decode(data: &[u8]) -> Result<(Vec, &[u8]), decode::Error> {
3333
for _ in 0..len {
3434
let (bit_num, rest) = bits.split_at(std::mem::size_of::<u64>());
3535
bits = rest;
36-
buf.push(u64::from_be_bytes(bit_num.try_into().unwrap()))
36+
buf.push(u64::from_be_bytes(bit_num.try_into().unwrap()));
3737
}
3838

3939
let (rlw, data) = decode::u32(data).ok_or(Error::Corrupt {

gix-chunk/src/file/decode.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl file::Index {
8181
start: offset,
8282
end: next_offset,
8383
},
84-
})
84+
});
8585
}
8686

8787
let sentinel = to_kind(&toc_entry[..4]);

gix-chunk/src/file/write.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ mod write_chunk {
6161
entry.offset.end,
6262
self.written_bytes,
6363
std::str::from_utf8(&entry.kind)
64-
)
64+
);
6565
}
6666
self.written_bytes = 0;
6767
self.next_chunk = self.chunks_to_write.pop_front();
@@ -92,7 +92,7 @@ impl Index {
9292
self.chunks.push(Entry {
9393
kind: chunk,
9494
offset: 0..exact_size_on_disk,
95-
})
95+
});
9696
}
9797

9898
/// Return the total size of all planned chunks thus far.

gix-config-value/src/color.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl Display for Color {
1818
write!(f, " ")?;
1919
}
2020
bg.fmt(f)?;
21-
write_space = Some(())
21+
write_space = Some(());
2222
}
2323

2424
if !self.attributes.is_empty() {
@@ -267,7 +267,7 @@ impl Display for Attribute {
267267
};
268268
if self.contains(attr) {
269269
if write_space.take().is_some() {
270-
write!(f, " ")?
270+
write!(f, " ")?;
271271
}
272272
match attr {
273273
Attribute::RESET => write!(f, "reset"),

gix-config/benches/large_config_file.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ use gix_config::{parse::Events, File};
33

44
fn gix_config(c: &mut Criterion) {
55
c.bench_function("GitConfig large config file", |b| {
6-
b.iter(|| File::try_from(black_box(CONFIG_FILE)).unwrap())
6+
b.iter(|| File::try_from(black_box(CONFIG_FILE)).unwrap());
77
});
88
}
99

1010
fn parser(c: &mut Criterion) {
1111
c.bench_function("Parser large config file", |b| {
12-
b.iter(|| Events::try_from(black_box(CONFIG_FILE)).unwrap())
12+
b.iter(|| Events::try_from(black_box(CONFIG_FILE)).unwrap());
1313
});
1414
}
1515

gix-config/src/file/access/mutate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl<'event> File<'event> {
380380
if !ends_with_newline(lhs.as_ref(), nl, true)
381381
&& !rhs.first().map_or(true, |e| e.to_bstr_lossy().starts_with(nl.as_ref()))
382382
{
383-
lhs.push(Event::Newline(Cow::Owned(nl.as_ref().into())))
383+
lhs.push(Event::Newline(Cow::Owned(nl.as_ref().into())));
384384
}
385385
lhs.extend(rhs);
386386
}

gix-config/src/file/includes/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ fn resolve_includes_recursive(
6666
let header = &section.header;
6767
let header_name = header.name.as_ref();
6868
if header_name == "include" && header.subsection_name.is_none() {
69-
detach_include_paths(&mut section_ids_and_include_paths, section, id)
69+
detach_include_paths(&mut section_ids_and_include_paths, section, id);
7070
} else if header_name == "includeIf" {
7171
if let Some(condition) = &header.subsection_name {
7272
let target_config_path = section.meta.path.as_deref();
7373
if include_condition_match(condition.as_ref(), target_config_path, options.includes)? {
74-
detach_include_paths(&mut section_ids_and_include_paths, section, id)
74+
detach_include_paths(&mut section_ids_and_include_paths, section, id);
7575
}
7676
}
7777
}
@@ -142,7 +142,7 @@ fn detach_include_paths(
142142
.values("path")
143143
.into_iter()
144144
.map(|path| (id, crate::Path::from(Cow::Owned(path.into_owned())))),
145-
)
145+
);
146146
}
147147

148148
fn include_condition_match(
@@ -251,7 +251,7 @@ fn gitdir_matches(
251251
{
252252
let mut prefixed = pattern_path.into_owned();
253253
prefixed.insert_str(0, "**/");
254-
pattern_path = prefixed.into()
254+
pattern_path = prefixed.into();
255255
}
256256
if pattern_path.ends_with(b"/") {
257257
let mut suffixed = pattern_path.into_owned();

gix-config/src/file/section/body.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ impl<'event> Body<'event> {
148148
}
149149
Event::ValueNotDone(_) | Event::ValueDone(_) => {
150150
if value_range.end == 0 {
151-
value_range.end = i
151+
value_range.end = i;
152152
} else {
153-
value_range.start = i
153+
value_range.start = i;
154154
};
155155
}
156156
_ => (),

gix-config/src/parse/events.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ fn from_bytes<'a, 'b>(
314314
}
315315
event => {
316316
if filter.map_or(true, |f| f(&event)) {
317-
events.push(convert(event))
317+
events.push(convert(event));
318318
}
319319
}
320320
})?;

gix-config/tests/key/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn valid_and_invalid() {
2121
assert_eq!(key.value_name, "baz");
2222

2323
let key = "includeIf.gitdir/i:C:\\bare.git.path".as_key();
24-
assert_eq!(key.subsection_name, Some("gitdir/i:C:\\bare.git".into()),)
24+
assert_eq!(key.subsection_name, Some("gitdir/i:C:\\bare.git".into()),);
2525
}
2626

2727
mod _ref {

gix-config/tests/parse/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn newlines_with_spaces() {
3535
assert_eq!(
3636
Events::from_str("\n \n \n").unwrap().into_vec(),
3737
vec![newline(), whitespace(" "), newline(), whitespace(" "), newline()]
38-
)
38+
);
3939
}
4040

4141
#[test]

gix-credentials/src/protocol/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub struct Context {
6161
pub fn helper_outcome_to_result(outcome: Option<helper::Outcome>, action: helper::Action) -> Result {
6262
fn redact(mut ctx: Context) -> Context {
6363
if let Some(pw) = ctx.password.as_mut() {
64-
*pw = "<redacted>".into()
64+
*pw = "<redacted>".into();
6565
}
6666
ctx
6767
}

0 commit comments

Comments
 (0)