Skip to content

Trait bounds inconsistent for metadata retrieval #260

Closed
@molpopgen

Description

@molpopgen

Functions to add metadata look like this:

    pub fn add_mutation_with_metadata<
        S: Into<SiteId>,
        N: Into<NodeId>,
        M: Into<MutationId>,
        MD: MutationMetadata,
        T: Into<Time>,
    >(...)

But functions to retrieve the metadata look like:

    pub fn metadata<T: metadata::MetadataRoundtrip>(
        &'a self,
        row: MutationId,
    );

Thus, the trait bound on the retrieval function is less strict.

Fixing this would technically be a breaking change.
But in practice, no code would break because you cannot record metadata
of a different type (trait bound) in the first place.

If nothing else, we should fix it for cleanliness' sake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions