I am using fluent-templates with the ArcLoader and Handlebars and it is working really well so far - thank you!
I noticed that when I call build() on the ArcLoaderBuilder that if I make an error it will panic due to the calls to expect() in build(). For my project that means I have to use std::panic::set_hook() to trap those errors which is not ideal.
Because ArcLoaderBuilder.build already returns a Result with the Error trait I think it would make more sense to just pass those errors back to the caller untouched - I am a beginner with Rust so not totally sure but I think it is more idiomatic to return them (?).
Happy to take a look at it further and submit a PR if you think this approach is worthwhile.
Hi XAMPPRocky,
I am using
fluent-templates
with theArcLoader
and Handlebars and it is working really well so far - thank you!I noticed that when I call
build()
on theArcLoaderBuilder
that if I make an error it will panic due to the calls toexpect()
inbuild()
. For my project that means I have to usestd::panic::set_hook()
to trap those errors which is not ideal.Because
ArcLoaderBuilder.build
already returns aResult
with theError
trait I think it would make more sense to just pass those errors back to the caller untouched - I am a beginner with Rust so not totally sure but I think it is more idiomatic to return them (?).Happy to take a look at it further and submit a PR if you think this approach is worthwhile.