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

It would be nice to add Less() #46

Closed
aboodman opened this issue May 16, 2018 · 4 comments · Fixed by ipfs/go-cidutil#5
Closed

It would be nice to add Less() #46

aboodman opened this issue May 16, 2018 · 4 comments · Fixed by ipfs/go-cidutil#5

Comments

@aboodman
Copy link

aboodman commented May 16, 2018

It's common to want to sort Cid, which requires an implementation of Less(). This can be done more efficiently inside Cid than outside because it won't require allocation if done inside (can directly access member fields which aren't exposed outside the package).

@dignifiedquire
Copy link
Member

@Stebalien any thoughts here?

@Stebalien
Copy link
Member

We're switching to string-backed CIDs so KeyString() will no longer allocate (today?). Once we do that, we can merge: ipfs/go-cidutil#5

@dignifiedquire
Copy link
Member

(today?)

🎉

@kevina
Copy link
Contributor

kevina commented Sep 22, 2018

We are now using string-backed CIDs.

Stebalien added a commit to ipfs/go-cidutil that referenced this issue Sep 24, 2018
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

Successfully merging a pull request may close this issue.

4 participants