Skip to content

Commit

Permalink
finish clippy3
Browse files Browse the repository at this point in the history
  • Loading branch information
cyz-ing committed Jan 16, 2025
1 parent b30efae commit 4afceac
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions exercises/clippy/clippy3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@
#[allow(unused_variables, unused_assignments)]
fn main() {
let my_option: Option<()> = None;
if let Some(x)=my_option {
println!("my_option has a value");
}
else
{
println!("my_option is a None");
if my_option.is_none() {
println!("{:?}", my_option);
}
let my_arr = &[
-1, -2, -3,
-4, -5, -6
-4, -5, -6,
];
println!("My array! Here it is: {:?}", my_arr);

Expand Down

0 comments on commit 4afceac

Please sign in to comment.