Skip to content

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

Merged
bors[bot] merged 1 commit intonix-rust:masterfrom
Blub:constify-uid-gid-pid
May 1, 2021
Merged

constify from_raw and as_raw for Uid, Gid and Pid and Uid::is_root#1429
bors[bot] merged 1 commit intonix-rust:masterfrom
Blub:constify-uid-gid-pid

Conversation

@Blub
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Blub commented Apr 22, 2021

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

Copy link
Copy Markdown
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.

Comment thread CHANGELOG.md
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
@Blub Blub force-pushed the constify-uid-gid-pid branch from 9c65e34 to 8fa391c Compare April 26, 2021 07:06
@Blub Blub requested a review from asomers April 27, 2021 11:25
Copy link
Copy Markdown
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.

2 participants