refactor: satisfy clippy::unnecessary_unwrap

New in Rust 1.93! Reference:
[`clippy::unnecessary_unwrap`](https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#unnecessary_unwrap)
This commit is contained in:
Erich Gubler authored and Connor Fitzgerald committed 2026-01-28 15:42:38 -05:00
1 parent 33a91d4ada
commit 59c351be6a
2 files changed
+7 -9

No files matched your search

+4 -4
View File
@@ -137,13 +137,13 @@ impl Instruction {
assert_eq!(wc, words.len() as u16);
assert_eq!(op, self.op as u16);
if self.type_id.is_some() {
assert_eq!(words[inst_index], self.type_id.unwrap());
if let Some(type_id) = self.type_id {
assert_eq!(words[inst_index], type_id);
inst_index += 1;
}
if self.result_id.is_some() {
assert_eq!(words[inst_index], self.result_id.unwrap());
if let Some(result_id) = self.result_id {
assert_eq!(words[inst_index], result_id);
inst_index += 1;
}
+3 -5
View File
@@ -225,11 +225,9 @@ impl<W: Write> Writer<W> {
Attribute::MeshStage(mesh_output_name),
Attribute::WorkGroupSize(ep.workgroup_size),
];
if ep.task_payload.is_some() {
let payload_name = module.global_variables[ep.task_payload.unwrap()]
.name
.clone()
.unwrap();
if let Some(task_payload) = ep.task_payload {
let payload_name =
module.global_variables[task_payload].name.clone().unwrap();
mesh_attrs.push(Attribute::TaskPayload(payload_name));
}
mesh_attrs