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

Impl TryFrom, From, and Into for VirtAddr #268

Open
budde25 opened this issue Jun 15, 2021 · 1 comment · May be fixed by #394
Open

Impl TryFrom, From, and Into for VirtAddr #268

budde25 opened this issue Jun 15, 2021 · 1 comment · May be fixed by #394

Comments

@budde25
Copy link
Contributor

budde25 commented Jun 15, 2021

Hello,

I was wondering if it would be useful to Implement TryFrom, From, and Into for VirtAddr (and maybe other some types as well). I noticed that VirtAddr type specifically has a to_u64. Reading the docs though it seems like the Into trait might be a more idiomatic way to do this.

Another one that might make sense is the TryFrom for u64 and From trait for u32, u16, u8 (the latter would automatically create an Into according to the docs).

If this seems like a worthwhile feature I'd be happy to make pull request.

Fantastic crate btw!

@budde25 budde25 changed the title Impl TryFrom, From, and Into for VirtAddr Impl TryFrom, From, and Into for VirtAddr Jun 15, 2021
@josephlr
Copy link
Contributor

@budde25 this seems reasonable. In #293 (comment) I brainstormed which conversion methods might make sense. PTAL

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.

2 participants