Skip to content

Error::Cfb drops the io::Error it wraps #899

Closed

Description

@DrunkOnJava

Error::Cfb(String) carries the failure as text: the 26 places that raise it (reader.rs 6, writer.rs 20) format the underlying io::Error into the message (create_stream {path}: {e}, write_all {path}: {e}, e.to_string()), so Error::source() returns None and a caller cannot tell a permission error from a full disk without parsing text.

Rust API Guidelines C-GOOD-ERR: keep the source. A shape that fits every site: Cfb { op: &'static str, path: Option<String>, #[source] source: io::Error } for the I/O failures, and Malformed (added in #898) for the two that are not I/O (dst has no filename component, a stream over the identity-stream cap). Found by the 2026-10-23 style audit; left out of #898 to keep that PR to variants that move without changing a payload.

Activity

  1. added
    area:reader
    area:writer
    priority:P3
    type:feature
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:readerarea:writerpriority:P3type:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions