Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Jul 2, 2024
1 parent 4226277 commit d0f1826
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/locations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl NodeInterner {
self.location_indices
.get_node_from_location(reference_location)
.and_then(|node_index| self.referenced_index(node_index))
.and_then(|node_index| Some(self.dependency_location(self.reference_graph[node_index])))
.map(|node_index| self.dependency_location(self.reference_graph[node_index]))
}

// Is the given location known to this interner?
Expand Down
4 changes: 3 additions & 1 deletion tooling/lsp/src/requests/goto_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ mod goto_definition_tests {
let response = on_goto_definition_request(&mut state, params)
.await
.expect("Could execute on_goto_definition_request")
.expect(&format!("Didn't get a goto definition response for index {index}"));
.unwrap_or_else(|| {
panic!("Didn't get a goto definition response for index {index}")
});

if let GotoDefinitionResponse::Scalar(location) = response {
assert_eq!(location.range, expected_range);
Expand Down

0 comments on commit d0f1826

Please sign in to comment.