You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E.g., when implementing YAML support, this testcase fails because more content is expected after goodbye:, so it points at column 9... in an 8-column line.
I feel like it'd still be useful to show that information.
#[test]#[cfg(feature = "yaml-serde")]fnyaml_invalid(){use axoasset::AxoassetError;#[derive(serde::Deserialize,PartialEq,Eq,Debug)]structMyType{hello:String,goodbye:bool,}// Make the filelet contents = String::from(r##"hello: "there"goodbye:"##,);let source = axoasset::SourceFile::new("file.yml", contents);let res = source.deserialize_yaml::<MyType>();assert!(res.is_err());println!("{:#?}", res);letErr(AxoassetError::Yaml{span:Some(_), .. }) = res else{panic!("span was invalid");};}
The text was updated successfully, but these errors were encountered:
duckinator
changed the title
if parse error happens at end-of-line, no information is given
if parse error happens at end-of-line, no span is given
Dec 4, 2024
E.g., when implementing YAML support, this testcase fails because more content is expected after
goodbye:
, so it points at column 9... in an 8-column line.I feel like it'd still be useful to show that information.
The text was updated successfully, but these errors were encountered: