Skip to content

load or read without creating a clone? #38

@WhyNotHugo

Description

@WhyNotHugo

Whenever data is read via load or read, the data Ini instance is mutated in place, but a clone of the inner data is returned too. So I end up with two copies of the data.

Why return a clone of the data? HashMap's Clone implementation is recursive, so this ends up copying the entire structure. Am I missing something here?

Is it somehow possible to do something like Init::read, but only get one copy of the data in memory? I don't need two copies. I know that I can just drop the clone, but I don't see the point it copying data just to drop it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions