Use character for split()
`cargo clippy` suggested to use a character instead of a string with a single character. See: <https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern>
This commit is contained in:
committed by
Jan Alexander Steffens (heftig)
parent
846ec8f898
commit
85d185fa98
@@ -81,7 +81,7 @@ impl FromStr for LevelSizes {
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
let mut sizes = Vec::new();
|
||||
|
||||
for size_str in s.split(",") {
|
||||
for size_str in s.split(',') {
|
||||
let size: usize = size_str
|
||||
.parse()
|
||||
.map_err(|_| "Not a comma separated list of numbers")?;
|
||||
|
||||
Reference in New Issue
Block a user