remove obsolete stuff
This commit is contained in:
parent
117d552939
commit
faf9589706
20
src/main.rs
20
src/main.rs
@ -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? }
|
||||
|
Loading…
Reference in New Issue
Block a user