You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom error implementation via thiserror in my project. I would like to have an error variant that corresponds to ParseColorError in Ratatui, but I am unable to use that type since it is private.
To Reproduce
use ratatui::style::Color;use std::str::FromStr;use thiserror::Error;#[derive(Error,Debug)]pubenumAppError{/// Error that may occur while parsing colors.#[error("Parse color error: `{0:?}`")]ParseColor(ratatui::style::color::ParseColorError),}fnmain() -> Result<(),AppError>{let color = Color::from_str("#000000")?;Ok(())}
9 | ParseColor(ratatui::style::color::ParseColorError),
| ^^^^^ --------------- struct `ParseColorError` is not publicly re-exported
| |
| private module
Proposal
Make ParseColorError public, either via exposing it from ratatui::style::color::ParseColorError or ratatui::style::ParseColorError. I think latter makes more sense since color module is private.
The text was updated successfully, but these errors were encountered:
Description
I have a custom error implementation via thiserror in my project. I would like to have an error variant that corresponds to
ParseColorError
in Ratatui, but I am unable to use that type since it is private.To Reproduce
Proposal
Make
ParseColorError
public, either via exposing it fromratatui::style::color::ParseColorError
orratatui::style::ParseColorError
. I think latter makes more sense sincecolor
module is private.The text was updated successfully, but these errors were encountered: