|
|
@@ -127,7 +127,7 @@ impl RaftStorageMonitorTrait for InMemoryStorageMonitor {
|
|
|
fn should_compact_log_now(&self) -> bool {
|
|
|
let stored = self.stored.0.lock();
|
|
|
let total_size = stored.total_size();
|
|
|
- return total_size > self.max_state_bytes;
|
|
|
+ total_size > self.max_state_bytes
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -242,7 +242,7 @@ mod tests {
|
|
|
Self {
|
|
|
index,
|
|
|
amount: index as f64 * 7.0,
|
|
|
- description: char::from('a' as u8 + index as u8).to_string(),
|
|
|
+ description: char::from(b'a' + index as u8).to_string(),
|
|
|
}
|
|
|
}
|
|
|
}
|