Skip to content

Commit 221c998

Browse files
committed
docs: fix misleading infallible wording and broken TextView doc link in render.rs
1 parent 271ac5f commit 221c998

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/presentation/cli/views/render.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
//! # Error handling
2222
//!
2323
//! Text renderers always return `Ok` — they do pure string formatting and never fail.
24-
//! JSON renderers call `serde_json::to_string_pretty` which is infallible on plain
25-
//! `#[derive(Serialize)]` types, but the `Result` return type models the theoretical
26-
//! failure path and is consistent with the `create` and `provision` commands that already
27-
//! return `Result`.
24+
//! JSON renderers call `serde_json::to_string_pretty`, which is expected to succeed for
25+
//! the plain `#[derive(Serialize)]` DTOs used in this project, but serialization errors
26+
//! are still possible (e.g. non-finite floats, non-string map keys, custom `Serialize`
27+
//! impls) and are propagated as [`ViewRenderError`].
2828
2929
/// Error produced by a [`Render`] implementation.
3030
///
@@ -41,7 +41,7 @@ pub enum ViewRenderError {
4141
/// Trait for rendering command output data into a string.
4242
///
4343
/// Implementors transform a DTO (`T`) into a displayable or parseable string.
44-
/// The `Result` return type is required even for infallible renderers (e.g., [`TextView`](super::commands::configure::views::text_view))
44+
/// The `Result` return type is required even for infallible renderers (e.g., [`TextView`](super::commands::configure::views::text_view::TextView))
4545
/// so that all renderers share a uniform interface and callers can use `?` unconditionally.
4646
///
4747
/// # Examples

0 commit comments

Comments
 (0)