Skip to content

Commit 30c4e53

Browse files
committed
use SeError on correct function
1 parent 012e497 commit 30c4e53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/macros.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,9 @@ macro_rules! set_collection_annotation {
364364
///
365365
/// # Returns
366366
/// Result indicating success or containing an error if the annotation is invalid
367-
pub fn [<set_ $collection_name _annotation>](&'a self, annotation: &str) -> Result<(), quick_xml::SeError> {
367+
pub fn [<set_ $collection_name _annotation>](&'a self, annotation: &str) -> Result<(), Box<dyn Error>> {
368368
let collection = $collection_type::new(self);
369-
collection.set_annotation(annotation).map_err(|e| SeError::Custom(e.to_string()))?;
369+
collection.set_annotation(annotation)?;
370370
Ok(())
371371
}
372372

@@ -398,9 +398,9 @@ macro_rules! set_collection_annotation {
398398
///
399399
/// # Returns
400400
/// Result indicating success or containing a serialization error
401-
pub fn [<set_ $collection_name _annotation_serde>]<T: Serialize>(&'a self, annotation: &T) -> Result<(), Box<dyn Error>> {
401+
pub fn [<set_ $collection_name _annotation_serde>]<T: Serialize>(&'a self, annotation: &T) -> Result<(), quick_xml::SeError> {
402402
let collection = $collection_type::new(self);
403-
collection.set_annotation_serde(annotation)?;
403+
collection.set_annotation_serde(annotation).map_err(|e| SeError::Custom(e.to_string()))?;
404404
Ok(())
405405
}
406406
}

0 commit comments

Comments
 (0)