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

constify from_raw and as_raw for Uid, Gid and Pid and Uid::is_root #1429

Merged
merged 1 commit into from May 1, 2021

Conversation

Blub
Copy link
Contributor

@Blub Blub commented Apr 21, 2021

Make some integer wrapper methods const fn.

  • Uid::from_raw
  • Uid::as_raw
  • Uid::is_root
  • Gid::from_raw
  • Gid::as_raw
  • Pid::from_raw
  • Pid::as_raw

(Changelog mentions rust 1.40.0 as minimum required version which seems to compile this fine (using 1.40.0 from rustup))

@Blub
Copy link
Contributor Author

Blub commented Apr 22, 2021

I don't think the failed check is due to this patch...

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch. Other than a PR link to the CHANGELOG, it looks good.

CHANGELOG.md Show resolved Hide resolved
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors bors bot merged commit bb875f2 into nix-rust:master May 1, 2021
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 this pull request may close these issues.

None yet

2 participants