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

aya: use impl Borrow<T> instead of T for maps #431

Merged
merged 8 commits into from
Nov 17, 2022
Merged

Conversation

0b01
Copy link
Contributor

@0b01 0b01 commented Nov 1, 2022

This PR changes map related APIs to use reference to Pod instead of Pod. This should fix #427

@netlify
Copy link

netlify bot commented Nov 1, 2022

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 76e417a
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/6372de952710fa0008164d03
😎 Deploy Preview https://deploy-preview-431--aya-rs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@alessandrod
Copy link
Collaborator

Thanks for doing this! Instead of taking references, I think we should take impl AsRef<V>, so that then both are possible

@0b01
Copy link
Contributor Author

0b01 commented Nov 1, 2022

Unfortunately T doesn't implement AsRef<T>: https://stackoverflow.com/a/48887885/1395536

However, impl Borrow<T> does work.

@0b01 0b01 changed the title Use &T instead of T for maps Use impl Borrow<T> instead of T for maps Nov 1, 2022
@0b01 0b01 changed the title Use impl Borrow<T> instead of T for maps aya: use impl Borrow<T> instead of T for maps Nov 1, 2022
@alessandrod alessandrod merged commit 88d7777 into aya-rs:main Nov 17, 2022
@alessandrod
Copy link
Collaborator

Thank you, great work 😊

@dave-tucker dave-tucker added fix A PR that is a small change or fixes a bug aya This is about aya (userspace) labels Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aya This is about aya (userspace) fix A PR that is a small change or fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API for updating maps with large Pod
3 participants