Skip to content
This repository was archived by the owner on Jan 10, 2026. It is now read-only.
This repository was archived by the owner on Jan 10, 2026. It is now read-only.

unwrap has a panicky connotation, recommend into_inner instead #9

@apoelstra

Description

@apoelstra

Feel free to close as this is just whining about the API, but I think the unwrap methods should be renamed on the Cursor types, and perhaps elsewhere. See for example

https://docs.rs/rincon_session/0.1.0/rincon_session/client/struct.Cursor.html#method.unwrap

The issue is that unwrap on Result and Option may cause the thread to panic, so readers of code may have an aversion to any functions with this name because they may mistake it for a potential "panic on error".

A better name would be into_inner, such as used by https://doc.rust-lang.org/std/io/struct.Cursor.html#method.into_inner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions