remove obsolete stuff

This commit is contained in:
kageru 2020-06-13 09:47:03 +02:00
parent 117d552939
commit faf9589706
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2
2 changed files with 2 additions and 22 deletions

@ -50,26 +50,6 @@ struct Song {
}
fn main() {
/*
let parsed = MpdParser::parse(Rule::response, input)
.expect("invalid response")
.next()
.unwrap();
let last = parsed.into_inner().last().unwrap();
match last.as_rule() {
Rule::ok => println!("response was ok"),
Rule::err => println!("response was an error"),
_ => unreachable!("Last response line should always be a status"),
}
let mut deser = MPDeserializer::from_str(
"Title: A song 星
Artist: A name
OK mpd 0.21.23",
)
.expect("broken deser");
let d = Song::deserialize(&mut deser);
println!("{:?}", d);
*/
let input_var: &str = "Title: A song 星
Artist: A name
OK mpd 0.21.23";

@ -1,5 +1,5 @@
key = { ('a'..'z' | 'A'..'Z')+ }
val = { (!"\n" ~ ANY)* }
key = _{ ('a'..'z' | 'A'..'Z')+ }
val = _{ (!"\n" ~ ANY)* }
kv = { key ~ ": " ~ val ~ "\n" }
ok = { "OK" ~ " "? ~ val? }
err = {"ACK" ~ " "? ~ val? }