Skip to content

cannot insert a range that the start equal with the end #10

@dwgeneral

Description

@dwgeneral

in src/map.rs

/// Panics if range `start >= end`.
    pub fn insert(&mut self, range: Range<K>, value: V) {
        // We don't want to have to make empty ranges make sense;
        // they don't represent anything meaningful in this structure.
        assert!(range.start < range.end);

I think we should allow the range params that the start equal with the end, it's meaningful in real business scence,
would you mind I change the code for this?

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