Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inserts do not replace previous keys #5

Open
9072997 opened this issue Dec 16, 2020 · 1 comment
Open

Inserts do not replace previous keys #5

9072997 opened this issue Dec 16, 2020 · 1 comment

Comments

@9072997
Copy link

9072997 commented Dec 16, 2020

package main

import (
	"fmt"

	"github.com/vishalkuo/bimap"
)

func main() {
	m := bimap.NewBiMap()
	m.Insert("foo", 100)
	m.Insert("foo", 200)
	exists := m.ExistsInverse(100)
	fmt.Println(exists)
}

This prints true. Intuitively I would expect 200 to replace 100. If this is intentional behavior I feel it should be documented. Thanks for the project btw.

@vishalkuo
Copy link
Owner

This is a bug and needs to be addressed. I don't have bandwidth right now but would review a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants