Shortcut of List Does Not Fail To Parse
AldaronLau opened this issue · 1 comments
AldaronLau commented
This test passes, when it really shouldn't, since lists can't be shortcuts.
use muon_rs as muon;
use serde::{Deserialize, Serialize};
/// Channel information for a specific bar of music.
#[derive(PartialEq, Debug, Serialize, Deserialize)]
pub struct Chan {
/// Notes for a channel
notes: Vec<String>,
lyric: Vec<String>,
}
/// A bar (or measure) of music.
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct Bar {
/// All of the channels in this piece.
pub chan: Vec<Chan>,
}
#[test]
fn people() -> muon::Result<()> {
const BAR: &str = "chan: 1/2R 1/2C4\n";
// Should fail.
let _b: Bar = muon::from_str(BAR)?;
Ok(())
}
DougLau commented
Fixed in 0.2.3