[ty] Reduce size of TypeInference (#19435)

This commit is contained in:
Micha Reiser 2025-07-22 11:36:36 +02:00 committed by GitHub
parent af62d0368f
commit 5e29278aa2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 678 additions and 164 deletions

View file

@ -1,8 +1,6 @@
use std::ops::Deref;
use std::sync::Arc;
use countme::Count;
use ruff_notebook::Notebook;
use ruff_python_ast::PySourceType;
use ruff_source_file::LineIndex;
@ -38,11 +36,7 @@ pub fn source_text(db: &dyn Db, file: File) -> SourceText {
};
SourceText {
inner: Arc::new(SourceTextInner {
kind,
read_error,
count: Count::new(),
}),
inner: Arc::new(SourceTextInner { kind, read_error }),
}
}
@ -125,8 +119,6 @@ impl std::fmt::Debug for SourceText {
#[derive(Eq, PartialEq, get_size2::GetSize)]
struct SourceTextInner {
#[get_size(ignore)]
count: Count<SourceText>,
kind: SourceTextKind,
read_error: Option<SourceTextError>,
}