rust-syndication / rss

Library for serializing the RSS web content syndication format
https://crates.io/crates/rss
Apache License 2.0
419 stars 52 forks source link

All build methods returning String instead of Error #128

Closed mlafeldt closed 2 years ago

mlafeldt commented 2 years ago

Hey,

First of all, thank you very much for this awesome crate. It works really well. 🎉

One thing I don't understand, however, is why all builders return Result<T, String> instead of Result<T, Error> for the build method.

That's not the default behavior of derive_builder and it makes for some weird code where e.g. GuidBuilder::default().value(...).build().unwrap() will return an empty String in case of an error. Same for ItemBuilder etc.

mlafeldt commented 2 years ago

I'm not sure but this might be due to the error setting in build_fn(name = "build_impl", private, error = "never::Never").

andy128k commented 2 years ago

This was already reported in #86 and fixed in #122. It was just not released yet.

mlafeldt commented 2 years ago

Ah, perfect! Looking forward to a new release then. 😄