docs(error): Fix link to ratatui_core::backend::ClearType enum#102
Merged
j-g00da merged 1 commit intoratatui:mainfrom Jun 26, 2025
Merged
docs(error): Fix link to ratatui_core::backend::ClearType enum#102j-g00da merged 1 commit intoratatui:mainfrom
ratatui_core::backend::ClearType enum#102j-g00da merged 1 commit intoratatui:mainfrom
Conversation
5fe1192 to
21217ee
Compare
j-g00da
reviewed
Jun 26, 2025
mousefood/src/error.rs
Outdated
Comment on lines
3
to
13
| /// Represents different drawing operations | ||
| #[derive(thiserror::Error, Debug)] | ||
| pub enum DrawErrorKind { | ||
| /// Error when trying to draw pixels on the display | ||
| #[error("drawing pixels")] | ||
| DrawingPixels, | ||
|
|
||
| /// Error when trying to draw a pixel on the display | ||
| #[error("clearing display")] | ||
| ClearingDisplay, | ||
| } | ||
|
|
||
| /// Represents backend error. | ||
| #[derive(thiserror::Error, Debug)] | ||
| pub enum Error { | ||
| /// Drawing to the display failed. | ||
| #[error("drawing to DrawTarget failed")] | ||
| DrawError, | ||
| /// Selected [`ClearType`] is not supported by Mousefood. | ||
| #[error("drawing to DrawTarget failed: {0}")] | ||
| DrawError(DrawErrorKind), | ||
|
|
||
| /// Selected [`ClearType`](ratatui_core::backend::ClearType) is not supported by Mousefood. | ||
| #[error("ClearType::{0} is not supported by Mousefood")] | ||
| ClearTypeUnsupported(alloc::string::String), | ||
| } |
Member
There was a problem hiding this comment.
I don't think there's a need to nest it this way, this would be fine done flat inside Error.
Also not sure if we even need to differentiate between clear error and draw error, because this is essentially the same action.
Contributor
Author
There was a problem hiding this comment.
Yes that makes sense. I'll revert this, and just keep the PR for the documentation.
21217ee to
b98f86f
Compare
Error::DrawErrorratatui_core::backend::ClearType enum
j-g00da
approved these changes
Jun 26, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed a rustdoc error linking to an enum of
ratatui_core.