mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-15 16:10:17 +00:00
Use CompactString
for Identifier
(#12101)
This commit is contained in:
parent
db6ee74cbe
commit
5109b50bb3
474 changed files with 4953 additions and 4776 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue