Skip to content

Commit

Permalink
Refactor: rename jump_to_definition to resolve_definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ggiraldez committed Nov 27, 2024
1 parent 362b35c commit d8730de
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/metaslang/bindings/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ impl<'a, KT: KindTypes + 'static> Reference<'a, KT> {
.expect("Reference does not have a valid file descriptor")
}

pub fn jump_to_definition(&self) -> Result<Definition<'a, KT>, ResolutionError<'a, KT>> {
pub fn resolve_definition(&self) -> Result<Definition<'a, KT>, ResolutionError<'a, KT>> {
Resolver::build_for(self, ResolveOptions::Full).first()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ fn find_and_resolve_reference<'a>(

// For the purpose of binding assertions, any failure to resolve to a single
// definition will be treated as if it was unresolved
Ok(reference.jump_to_definition().ok())
Ok(reference.resolve_definition().ok())
}

fn lookup_referenced_definition<'a>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fn build_report_for_part<'a>(
start..end
};

let definition = reference.jump_to_definition();
let definition = reference.resolve_definition();
let message = match definition {
Ok(definition) => {
if definition.get_file().is_system() {
Expand Down
2 changes: 1 addition & 1 deletion crates/solidity/testing/perf/src/tests/references.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn run(bindings: Bindings) {
}
reference_count += 1;

let resolution = reference.jump_to_definition();
let resolution = reference.resolve_definition();
if resolution.is_ok() {
resolved_references += 1;
}
Expand Down

0 comments on commit d8730de

Please sign in to comment.