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:
@@ -18,7 +18,7 @@ struct KillSet {
|
||||
impl KillSet {
|
||||
pub fn new() -> KillSet {
|
||||
KillSet {
|
||||
set: HashSet::new(),
|
||||
set: Default::default(),
|
||||
vec: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ impl DepGraph {
|
||||
deps: Vec::new(),
|
||||
instr_deps: Default::default(),
|
||||
instr_waits: Default::default(),
|
||||
active: HashSet::new(),
|
||||
active: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ impl LiveSet {
|
||||
pub fn new() -> LiveSet {
|
||||
LiveSet {
|
||||
live: Default::default(),
|
||||
set: HashSet::new(),
|
||||
set: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user