mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-23 04:55:09 +00:00
ruff_python_ast: Make Singleton
Copy
(#14943)
## Summary Minor changed pulled out from #14759, as it seems to make sense in isolation. ## Test Plan —
This commit is contained in:
parent
e5cb4d6388
commit
d2712c7669
2 changed files with 3 additions and 3 deletions
|
@ -669,7 +669,7 @@ impl<'a> Generator<'a> {
|
|||
self.unparse_expr(value, precedence::MAX);
|
||||
}
|
||||
Pattern::MatchSingleton(ast::PatternMatchSingleton { value, range: _ }) => {
|
||||
self.unparse_singleton(value);
|
||||
self.unparse_singleton(*value);
|
||||
}
|
||||
Pattern::MatchSequence(ast::PatternMatchSequence { patterns, range: _ }) => {
|
||||
self.p("[");
|
||||
|
@ -1211,7 +1211,7 @@ impl<'a> Generator<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn unparse_singleton(&mut self, singleton: &Singleton) {
|
||||
pub(crate) fn unparse_singleton(&mut self, singleton: Singleton) {
|
||||
match singleton {
|
||||
Singleton::None => self.p("None"),
|
||||
Singleton::True => self.p("True"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue