Skip to content

Commit

Permalink
Remove bools that aren't necessary
Browse files Browse the repository at this point in the history
Created using spr 1.3.4
  • Loading branch information
sunshowers committed Sep 28, 2023
1 parent 716e79d commit 7663d06
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions update-engine/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,6 @@ mod tests {
"all events passed in",
|buffer, event| {
buffer.add_event(event.clone());
true
},
WithDeltas::No,
)
Expand All @@ -1403,9 +1402,8 @@ mod tests {
|buffer, event| match event {
Event::Step(event) => {
buffer.add_step_event(event.clone());
true
}
Event::Progress(_) => false,
Event::Progress(_) => {}
},
WithDeltas::Both,
)
Expand All @@ -1418,13 +1416,11 @@ mod tests {
Event::Step(event) => match event.kind.priority() {
StepEventPriority::High => {
buffer.add_step_event(event.clone());
true
}
StepEventPriority::Low => false,
StepEventPriority::Low => {}
},
Event::Progress(event) => {
buffer.add_progress_event(event.clone());
true
}
},
WithDeltas::Both,
Expand All @@ -1438,13 +1434,11 @@ mod tests {
Event::Step(event) => match event.kind.priority() {
StepEventPriority::High => {
buffer.add_step_event(event.clone());
true
}
StepEventPriority::Low => false,
StepEventPriority::Low => {}
},
Event::Progress(_) => {
// Don't add progress events.
false
}
},
WithDeltas::Both,
Expand Down Expand Up @@ -1576,10 +1570,7 @@ mod tests {
fn run_filtered_test(
&self,
event_fn_description: &str,
mut event_fn: impl FnMut(
&mut EventBuffer<TestSpec>,
&Event<TestSpec>,
) -> bool,
mut event_fn: impl FnMut(&mut EventBuffer<TestSpec>, &Event<TestSpec>),
with_deltas: WithDeltas,
) -> anyhow::Result<()> {
match with_deltas {
Expand All @@ -1604,10 +1595,7 @@ mod tests {

fn run_filtered_test_inner(
&self,
mut event_fn: impl FnMut(
&mut EventBuffer<TestSpec>,
&Event<TestSpec>,
) -> bool,
mut event_fn: impl FnMut(&mut EventBuffer<TestSpec>, &Event<TestSpec>),
with_deltas: bool,
) -> anyhow::Result<()> {
let description = format!("with deltas = {with_deltas}");
Expand Down

0 comments on commit 7663d06

Please sign in to comment.