mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-09 10:39:46 -10:00
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:
1 parent
618d20bd08
commit
35581f52e2
1 file changed
+4
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user