We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2278b17 commit 78542ebCopy full SHA for 78542eb
src/ir.rs
@@ -374,13 +374,9 @@ impl SymbolTable {
374
}
375
376
pub fn struct_id_from_name(&mut self, name: &str) -> Option<StructId> {
377
- self.structs.iter().find_map(|(id, s)| {
378
- if s.name() == name {
379
- Some(id)
380
- } else {
381
- None
382
- }
383
- })
+ self.structs
+ .iter()
+ .find_map(|(id, s)| if s.name() == name { Some(id) } else { None })
384
385
386
pub fn struct_from_struct_id(&mut self, struct_id: StructId) -> &Struct {
@@ -407,7 +403,7 @@ impl Index<SymbolId> for SymbolTable {
407
403
fn index(&self, index: SymbolId) -> &Self::Output {
408
404
&self.entries[index]
409
405
410
-}
406
+}
411
412
impl Index<&SymbolId> for SymbolTable {
413
type Output = SymbolTableEntry;
0 commit comments