mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-16 01:25:11 +00:00
Remove unnecessary string cloning from the parser (#9884)
Closes https://github.com/astral-sh/ruff/issues/9869.
This commit is contained in:
parent
7ca515c0aa
commit
6f0e4ad332
11 changed files with 227 additions and 119 deletions
|
@ -644,7 +644,7 @@ pub struct ComparableBytesLiteral<'a> {
|
|||
impl<'a> From<&'a ast::BytesLiteral> for ComparableBytesLiteral<'a> {
|
||||
fn from(bytes_literal: &'a ast::BytesLiteral) -> Self {
|
||||
Self {
|
||||
value: bytes_literal.value.as_slice(),
|
||||
value: &bytes_literal.value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue