From 16ac4411f066329ccb8b252af872c0e2e775574f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Nerma?= Date: Sat, 11 Nov 2023 22:35:20 +0100 Subject: [PATCH] Make `Result` and `ReedlineError` public (#661) * Make `Result` and `ReedlineError` public Allows implementing custom `History` types * Fix: style * Add rustdoc for reedline::Result --- src/lib.rs | 2 +- src/result.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 83fb2a9e..fda2315a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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"))] diff --git a/src/result.rs b/src/result.rs index 51703816..3651a5ae 100644 --- a/src/result.rs +++ b/src/result.rs @@ -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 = std::result::Result;