Keep the clippy rules happy in the difficulty test

The level is built with the struct update syntax instead of a field
assignment after Default::default(), which clippy's
field_reassign_with_default rejects.

Co-Authored-By: minimax-m3.1-flash (Claude Code) <[email protected]>
This commit is contained in:
levzzzandminimax-m3.1-flash committed 2026-10-27 16:46:15 +05:00
1 parent 618d20bd08
commit 35581f52e2
1 file changed
+4 -2
+4 -2
View File
@@ -5014,8 +5014,10 @@ mod tests {
assert_eq!(back.difficulty, "hard");
assert_eq!(back.difficulty_id(), 3);
// A world whose difficulty is not one of ours is normal.
let mut other = Level::default();
other.difficulty = "extreme".into();
let other = Level {
difficulty: "extreme".into(),
..Level::default()
};
assert_eq!(other.difficulty_id(), 2);
let _ = fs::remove_dir_all(&dir);
}