mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 12:55:05 +00:00
Reduce Result<Tok, LexicalError>
size by using Box<str>
instead of String
(#9885)
This commit is contained in:
parent
9027169125
commit
fe7d965334
22 changed files with 454 additions and 425 deletions
|
@ -39,7 +39,7 @@ pub(crate) fn assignment_target(target: &Expr) -> Result<(), LexicalError> {
|
|||
|
||||
let err = |location: TextSize| -> LexicalError {
|
||||
let error = LexicalErrorType::AssignmentError;
|
||||
LexicalError { error, location }
|
||||
LexicalError::new(error, location)
|
||||
};
|
||||
match *target {
|
||||
BoolOp(ref e) => Err(err(e.range.start())),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue