update to rust edition 2018 + bump version

This commit is contained in:
Henrik Friedrichsen
2020-03-15 11:05:49 +01:00
parent 662e8e4304
commit dccb36d8e7
29 changed files with 190 additions and 177 deletions

View File

@@ -1,4 +1,4 @@
use queue::RepeatSetting;
use crate::queue::RepeatSetting;
use std::collections::HashMap;
use std::fmt;
use std::iter::FromIterator;
@@ -252,7 +252,7 @@ pub fn parse(input: &str) -> Option<Command> {
Some(Command::Repeat(mode))
}
"seek" => args.get(0).and_then(|arg| match arg.chars().nth(0) {
"seek" => args.get(0).and_then(|arg| match arg.chars().next() {
Some(x) if x == '-' || x == '+' => String::from_iter(arg.chars().skip(1))
.parse::<i32>()
.ok()