perf: simplify method signatures and reduce clone across multiple files (#1663)

This commit is contained in:
Tunglies
2025-12-09 16:47:57 +08:00
committed by GitHub
parent 2bc51daa98
commit fe4dff5df0
33 changed files with 62 additions and 81 deletions
@@ -90,7 +90,7 @@ where
/// Rotates old files to make room for a new one.
/// This may result in the deletion of the oldest file
fn rotate_files(&mut self) -> io::Result<()> {
fn rotate_files(&self) -> io::Result<()> {
// ignore any failure removing the oldest file (may not exist)
let _ = fs::remove_file(self.filename_for(self.max_filecount.max(1)));
let mut r = Ok(());