mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-19 01:24:05 +00:00
23 lines
395 B
Rust
23 lines
395 B
Rust
|
#![allow(unused)]
|
||
|
#![warn(clippy::manual_find)]
|
||
|
|
||
|
fn vec_string(strings: Vec<String>) -> Option<String> {
|
||
|
for s in strings {
|
||
|
if s == String::new() {
|
||
|
return Some(s);
|
||
|
}
|
||
|
}
|
||
|
None
|
||
|
}
|
||
|
|
||
|
fn tuple(arr: Vec<(String, i32)>) -> Option<String> {
|
||
|
for (s, _) in arr {
|
||
|
if s == String::new() {
|
||
|
return Some(s);
|
||
|
}
|
||
|
}
|
||
|
None
|
||
|
}
|
||
|
|
||
|
fn main() {}
|