Compare commits

...

1 Commits

Author SHA1 Message Date
xiaomage f6ebc9182b fix(ecstore): keep the clone-safety assertion without a redundant clone
clippy 1.98 (-D warnings) flags `marked.clone()` at the test's last use
of `marked` as a redundant clone, which turned `cargo clippy --tests`
red on release since #7668 and blocks every PR lane that runs it.
Bind the clone to a variable first so the test still proves both that
the original marker survives cloning and that the clone carries it.
2026-09-12 08:59:19 +08:00
+2 -1
View File
@@ -865,8 +865,9 @@ mod tests {
io::ErrorKind::PermissionDenied,
"staging rejected",
)));
let cloned = marked.clone();
assert!(marked.is_conditional_file_not_committed());
assert!(marked.clone().is_conditional_file_not_committed());
assert!(cloned.is_conditional_file_not_committed());
assert!(!DiskError::Timeout.is_conditional_file_not_committed());
assert!(
!DiskError::Io(io::Error::new(io::ErrorKind::PermissionDenied, "rename rejected"))