Use CompactString for Identifier (#12101)

This commit is contained in:
Micha Reiser 2024-07-01 10:06:02 +02:00 committed by GitHub
parent db6ee74cbe
commit 5109b50bb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
474 changed files with 4953 additions and 4776 deletions

View file

@ -1,5 +1,3 @@
pub mod all;
use std::path::Path;
use bitflags::bitflags;
@ -27,6 +25,8 @@ use crate::reference::{
use crate::scope::{Scope, ScopeId, ScopeKind, Scopes};
use crate::Imported;
pub mod all;
/// A semantic model for a Python module, to enable querying the module's semantic information.
pub struct SemanticModel<'a> {
typing_modules: &'a [String],
@ -936,7 +936,7 @@ impl<'a> SemanticModel<'a> {
.all(|scope| !scope.has(name))
{
return Some(ImportedName {
name: (*name).to_string(),
name: name.to_string(),
source,
range: self.nodes[source].range(),
context: binding.context,