This commit is contained in:
Scott Lamb
2024-02-12 17:32:37 -08:00
parent f3da22fc5c
commit f385215d6e
6 changed files with 11 additions and 11 deletions

View File

@@ -345,7 +345,7 @@ fn compare_stream(
stream
.recordings
.entry(id.recording())
.or_insert_with(Recording::default)
.or_default()
.recording_row = Some(s);
}
}
@@ -382,7 +382,7 @@ fn compare_stream(
stream
.recordings
.entry(id.recording())
.or_insert_with(Recording::default)
.or_default()
.playback_row = Some(s);
}
}
@@ -405,7 +405,7 @@ fn compare_stream(
stream
.recordings
.entry(id.recording())
.or_insert_with(Recording::default)
.or_default()
.integrity_row = true;
}
}

View File

@@ -102,7 +102,7 @@ impl Value for SignalValue {
type Change = SignalChange;
fn apply(&mut self, c: &SignalChange) {
if self.states.len() < usize::try_from(c.new_state).unwrap() {
if self.states.len() < usize::from(c.new_state) {
self.states.resize(c.new_state as usize, 0);
}
@@ -117,7 +117,7 @@ impl Value for SignalValue {
if c.old_state > 0 {
// remove from old state.
let i = usize::try_from(c.old_state).unwrap() - 1;
let i = usize::from(c.old_state) - 1;
assert!(
self.states.len() > i,
"no such old state: s={self:?} c={c:?}"