Skip to content

Commit

Permalink
Make Result and ReedlineError public (#661)
Browse files Browse the repository at this point in the history
* Make `Result` and `ReedlineError` public

Allows implementing custom `History` types

* Fix: style

* Add rustdoc for reedline::Result
  • Loading branch information
Clément Nerma authored Nov 11, 2023
1 parent c853d71 commit 16ac441
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ mod engine;
pub use engine::Reedline;

mod result;
pub(crate) use result::Result;
pub use result::{ReedlineError, Result};

mod history;
#[cfg(any(feature = "sqlite", feature = "sqlite-dynlib"))]
Expand Down
2 changes: 1 addition & 1 deletion src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ impl Display for ReedlineError {
}
impl std::error::Error for ReedlineError {}

// for now don't expose the above error type to the public
/// Standard [`std::result::Result`], with [`ReedlineError`] as the error variant
pub type Result<T> = std::result::Result<T, ReedlineError>;

0 comments on commit 16ac441

Please sign in to comment.