Skip to content

Commit

Permalink
clippy and fmt issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xunilrj committed Dec 5, 2023
1 parent 1086be2 commit 34e3ad8
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions sway-core/src/decl_engine/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
sync::{Arc, RwLock},
};

use sway_types::{ModuleId, Named, Span, Spanned};
use sway_types::{ModuleId, Named, Spanned};

use crate::{
concurrent_slab::{ConcurrentSlab, ListDisplay},
Expand Down Expand Up @@ -329,14 +329,6 @@ impl DeclEngine {
self.get(index)
}

pub fn get_structs_by_name(&self, name: &Ident) -> Option<DeclRef<DeclId<TyStructDecl>>> {
self.struct_slab.with_slice(|elems| {
let i = elems.iter().position(|decl| decl.name() == name)?;

Some(DeclRef::new(name.clone(), DeclId::new(i), Span::dummy()))
})
}

/// Friendly helper method for calling the `get` method from the
/// implementation of [DeclEngineGet] for [DeclEngine].
///
Expand Down

0 comments on commit 34e3ad8

Please sign in to comment.