Skip to content

Commit

Permalink
Index: Accept a slice instead of Vec reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangjchandler committed Dec 18, 2024
1 parent 22ff79c commit adfa389
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/index/src/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl<'a> Indexer<'a> {
}
}

pub fn index(&mut self, ast: &Vec<Statement>) {
pub fn index(&mut self, ast: &[Statement]) {
self.visit(ast);
}

Expand Down
6 changes: 3 additions & 3 deletions crates/index/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ impl Index {
self.classes.contains_key(name)
}

pub(crate) fn add_constant(&mut self, constant: Constant) {
self.constants.insert(constant.name.clone(), constant);
}
// pub(crate) fn add_constant(&mut self, constant: Constant) {
// self.constants.insert(constant.name.clone(), constant);
// }

pub fn get_class(&self, name: &ByteString) -> Option<ReflectionClass> {
self.classes.get(name).map(|class| ReflectionClass {
Expand Down

0 comments on commit adfa389

Please sign in to comment.