nak: s/HashSet::new()/Default::default()/

wherever this doesn't result in type inference failing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34865>
This commit is contained in:
Mel Henning
2025-05-14 16:12:27 -04:00
committed by Marge Bot
parent 7a47f29d6d
commit b4b557c9ef
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ struct KillSet {
impl KillSet {
pub fn new() -> KillSet {
KillSet {
set: HashSet::new(),
set: Default::default(),
vec: Vec::new(),
}
}
+1 -1
View File
@@ -76,7 +76,7 @@ impl DepGraph {
deps: Vec::new(),
instr_deps: Default::default(),
instr_waits: Default::default(),
active: HashSet::new(),
active: Default::default(),
}
}
+2 -2
View File
@@ -347,12 +347,12 @@ impl<'a> ShaderFromNir<'a> {
label_alloc: LabelAllocator::new(),
block_label: Default::default(),
bar_label: Default::default(),
sync_blocks: HashSet::new(),
sync_blocks: Default::default(),
crs: Vec::new(),
fs_out_regs: [None; 34],
end_block_id: 0,
ssa_map: Default::default(),
saturated: HashSet::new(),
saturated: Default::default(),
nir_instr_printer: NirInstrPrinter::new().unwrap(),
}
}
+1 -1
View File
@@ -18,7 +18,7 @@ impl LiveSet {
pub fn new() -> LiveSet {
LiveSet {
live: Default::default(),
set: HashSet::new(),
set: Default::default(),
}
}
+2 -2
View File
@@ -20,8 +20,8 @@ impl DeadCodePass {
DeadCodePass {
any_dead: false,
new_live: false,
live_ssa: HashSet::new(),
live_phi: HashSet::new(),
live_ssa: Default::default(),
live_phi: Default::default(),
}
}