Make the statement vector private on SemanticModel (#6348)

## Summary

Instead, expose these as methods, now that we can use a reasonable
nomenclature on the API.
This commit is contained in:
Charlie Marsh 2023-08-07 11:02:14 -04:00 committed by GitHub
parent bae87fa016
commit 61d3977f95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 55 additions and 25 deletions

View file

@ -185,7 +185,7 @@ impl<'a> Binding<'a> {
/// Returns the range of the binding's parent.
pub fn parent_range(&self, semantic: &SemanticModel) -> Option<TextRange> {
self.source
.map(|node_id| semantic.statements[node_id])
.map(|statement_id| semantic.statement(statement_id))
.and_then(|parent| {
if parent.is_import_from_stmt() {
Some(parent.range())