Make Result and ReedlineError public (#661)

* Make `Result` and `ReedlineError` public

Allows implementing custom `History` types

* Fix: style

* Add rustdoc for reedline::Result
This commit is contained in:
Clément Nerma 2023-11-11 22:35:20 +01:00 committed by GitHub
parent c853d71e66
commit 16ac4411f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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"))]

View File

@ -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>;