mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 21:42:34 +00:00
minor improvements to rustical_xml errors
This commit is contained in:
@@ -26,8 +26,11 @@ impl Value for SyncLevel {
|
||||
Ok(match val {
|
||||
"1" => Self::One,
|
||||
"Infinity" => Self::Infinity,
|
||||
// TODO: proper error
|
||||
_ => return Err(rustical_xml::XmlDeError::UnknownError),
|
||||
_ => {
|
||||
return Err(rustical_xml::XmlDeError::Other(
|
||||
"Invalid sync-level".to_owned(),
|
||||
))
|
||||
}
|
||||
})
|
||||
}
|
||||
fn serialize(&self) -> String {
|
||||
|
||||
Reference in New Issue
Block a user