refactor: utilise first() instead of get(0)

This commit is contained in:
Muhammad Nauman Raza 2025-01-29 19:56:32 +00:00
parent f5eb252266
commit 169105952a
Signed by: devraza
GPG key ID: 91EAD6081011574B

View file

@ -19,7 +19,7 @@ fn process(
) -> usize {
let ops: Vec<String> = line.split_whitespace().map(String::from).collect();
match ops.get(0).map(String::as_str) {
match ops.first().map(String::as_str) {
Some("INP") => {
let mut s = String::new();
io::stdin().read_line(&mut s).unwrap();