(&mut self, ident: &Ident)
| 83 | } |
| 84 | |
| 85 | pub fn get_mut(&mut self, ident: &Ident) -> Option<&mut Decl> { |
| 86 | let mut ns = self; |
| 87 | |
| 88 | for part in &ident.path { |
| 89 | let entry = ns.names.get_mut(part); |
| 90 | |
| 91 | match entry { |
| 92 | Some(Decl { |
| 93 | kind: DeclKind::Module(inner), |
| 94 | .. |
| 95 | }) => { |
| 96 | ns = inner; |
| 97 | } |
| 98 | _ => return None, |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | ns.names.get_mut(&ident.name) |
| 103 | } |
| 104 | |
| 105 | /// Get namespace entry using a fully qualified ident. |
| 106 | pub fn get(&self, fq_ident: &Ident) -> Option<&Decl> { |
no outgoing calls
no test coverage detected