mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
clear source texts
This commit is contained in:
parent
e352a50b74
commit
d1f16703ab
25 changed files with 150 additions and 79 deletions
|
@ -1,3 +1,4 @@
|
|||
use std::borrow::Cow;
|
||||
use std::cell::RefCell;
|
||||
use std::cmp::Ordering;
|
||||
use std::fmt::{Formatter, Write};
|
||||
|
@ -519,8 +520,8 @@ impl SemanticSyntaxContext for SemanticSyntaxCheckerVisitor<'_> {
|
|||
self.diagnostics.borrow_mut().push(error);
|
||||
}
|
||||
|
||||
fn source(&self) -> &str {
|
||||
self.source
|
||||
fn source(&self) -> Cow<'_, str> {
|
||||
Cow::Borrowed(self.source)
|
||||
}
|
||||
|
||||
fn global(&self, _name: &str) -> Option<TextRange> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue