Skip to content

Document Item::None return values #683

Open
@T0mstone

Description

@T0mstone

Context: I have a custom wrapper on top of toml_edit that allows carrying around a mix of mutable references and owned data.

I was severely confused by Item::None and its complete lack of explanation (since none is not something in the TOML spec).

After reading #299, I now have somewhat of an idea what Item::None is used for, but I find it really annoying to deal with.
My proposal: I would like it if everything that returned an Item documented exactly if and when it returns Item::None.

In particular, I'm looking at OccupiedEntry::{get,into}_mut. I assume that they can't return Item::None (as that wouldn't make sense), but without proper documentation, I can't be sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-editArea: TOML editing APIC-enhancementCategory: Raise on the bar on expectations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions