refactor: utilise first()
instead of get(0)
This commit is contained in:
parent
f5eb252266
commit
169105952a
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ fn process(
|
||||||
) -> usize {
|
) -> usize {
|
||||||
let ops: Vec<String> = line.split_whitespace().map(String::from).collect();
|
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") => {
|
Some("INP") => {
|
||||||
let mut s = String::new();
|
let mut s = String::new();
|
||||||
io::stdin().read_line(&mut s).unwrap();
|
io::stdin().read_line(&mut s).unwrap();
|
||||||
|
|
Loading…
Reference in a new issue