mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 17:15:05 +00:00
29 lines
487 B
Rust
29 lines
487 B
Rust
|
#![allow(dead_code)]
|
||
|
#![deny(clippy::if_same_then_else, clippy::branches_sharing_code)]
|
||
|
|
||
|
// ##################################
|
||
|
// # Issue clippy#7369
|
||
|
// ##################################
|
||
|
#[derive(Debug)]
|
||
|
pub struct FooBar {
|
||
|
foo: Vec<u32>,
|
||
|
}
|
||
|
|
||
|
impl FooBar {
|
||
|
pub fn bar(&mut self) {
|
||
|
if true {
|
||
|
self.foo.pop();
|
||
|
} else {
|
||
|
self.baz();
|
||
|
|
||
|
self.foo.pop();
|
||
|
|
||
|
self.baz()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn baz(&mut self) {}
|
||
|
}
|
||
|
|
||
|
fn main() {}
|