mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:24:57 +00:00
[ty] Reduce size of member table (#19572)
This commit is contained in:
parent
cc97579c3b
commit
b96aa4605b
5 changed files with 722 additions and 134 deletions
|
@ -36,6 +36,10 @@ impl Name {
|
|||
pub fn as_str(&self) -> &str {
|
||||
self.0.as_str()
|
||||
}
|
||||
|
||||
pub fn push_str(&mut self, s: &str) {
|
||||
self.0.push_str(s);
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for Name {
|
||||
|
@ -44,6 +48,13 @@ impl Debug for Name {
|
|||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Write for Name {
|
||||
fn write_str(&mut self, s: &str) -> std::fmt::Result {
|
||||
self.0.push_str(s);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<str> for Name {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &str {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue