8000 Consider splitting `Decor` out of types · Issue #888 · toml-rs/toml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Consider splitting Decor out of types #888
Open
@epage

Description

@epage

Right now, we have

  • Value::* which is Formatted which has Decor and Repr
  • Array which has Decor and Span
  • InlineTable which has Decor and Span
  • Key which has two Decors and Repr

This makes it annoying for operating on a Values decor because you have to handle every case differently. This also requires manual work to maintain the Decor when changing a Value.

Could have a pub Decoration type and pub Decorated<T>?

Would love to do something similar for Repr but we have to make sure that gets deleted when a Value is overwritten.

< 4B36 div class="CommentLoading-module__CommentLoadingContent--nb4e3">

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-editArea: TOML editing APIC-questionUncertainty is involvedM-breaking-changeMeta: Implementing or merging this will introduce a breaking change.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0