diff --git a/members/sqlite-demo/src/main.rs b/members/sqlite-demo/src/main.rs index fd72801..93caa43 100644 --- a/members/sqlite-demo/src/main.rs +++ b/members/sqlite-demo/src/main.rs @@ -296,13 +296,13 @@ fn main() -> anyhow::Result<()> { let _ = stdin.lock().read_line(&mut buf); buf = buf.trim().to_string(); buf = buf.to_uppercase().to_string(); - if buf.starts_with("A") { + if buf.starts_with('A') { interactive_add_cat(&conn)?; - } else if buf.starts_with("F") { + } else if buf.starts_with('F') { interactive_find_cat(&conn)?; - } else if buf.starts_with("P") { + } else if buf.starts_with('P') { print_all_data(&conn)?; - } else if buf.starts_with("D") { + } else if buf.starts_with('D') { let words: Vec<&str> = buf.split(' ').collect(); dbg!(&words); if words.len() < 2 { @@ -378,7 +378,7 @@ fn main() -> anyhow::Result<()> { } } } - } else if buf.starts_with("E") { + } else if buf.starts_with('E') { println!("Goodbye"); break; }