Clippy: HACK! Fix bootstrap error
This will be removed in the next sync, once beta is at 1.52. Until then this hack avoids to put `cfg(bootstrap)` into Clippy.
This commit is contained in:
parent
f2f2a005b4
commit
a189df12bd
|
@ -203,8 +203,11 @@ struct MinifyingSugg<'a>(Sugg<'a>);
|
||||||
|
|
||||||
impl<'a> MinifyingSugg<'a> {
|
impl<'a> MinifyingSugg<'a> {
|
||||||
fn as_str(&self) -> &str {
|
fn as_str(&self) -> &str {
|
||||||
let (Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s)) = &self.0;
|
// HACK: Don't sync to Clippy! Required because something with the `or_patterns` feature
|
||||||
s.as_ref()
|
// changed and this would now require parentheses.
|
||||||
|
match &self.0 {
|
||||||
|
Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) => s.as_ref(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn into_sugg(self) -> Sugg<'a> {
|
fn into_sugg(self) -> Sugg<'a> {
|
||||||
|
|
Loading…
Reference in a new issue