blackgear / rustdoc_seeker

rustdoc-seeker parse the `search-index.js` generated by `rustdoc` and provide fast searching ability
MIT License
5 stars 4 forks source link

RustDoc::build should be infallible #1

Closed upsuper closed 6 years ago

upsuper commented 6 years ago

fst::MapBuilder says

If a key is inserted that is less than or equal to any previous key added, then an error is returned. Similarly, if there was a problem writing to the underlying writer, an error is returned.

Given that this crate only uses MapBuilder::memory, there is no error from underlying writer (since Rust's allocation is infallible). The key inserting order should be promised by this crate, and shouldn't be propagated to users.

I think you can unwrap the errors.