Skip to content

Commit 0b2e999

Browse files
bors[bot]asomers
andauthored
Merge #1694
1694: Use singular number for all feature names r=rtzoeller a=asomers features => feature users => user Neither of these features have yet been included in a release, so it's ok to rename them. Co-authored-by: Alan Somers <[email protected]>
2 parents 256707e + 145c240 commit 0b2e999

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ memoffset = { version = "0.6.3", optional = true }
3636

3737
[features]
3838
default = [
39-
"acct", "aio", "dir", "env", "event", "features", "fs",
39+
"acct", "aio", "dir", "env", "event", "feature", "fs",
4040
"hostname", "inotify", "ioctl", "kmod", "mman", "mount", "mqueue",
4141
"net", "personality", "poll", "process", "pthread", "ptrace", "quota",
4242
"reboot", "resource", "sched", "signal", "socket", "term", "time",
43-
"ucontext", "uio", "users", "zerocopy",
43+
"ucontext", "uio", "user", "zerocopy",
4444
]
4545

4646
acct = []
4747
aio = []
4848
dir = ["fs"]
4949
env = []
5050
event = []
51-
features = []
51+
feature = []
5252
fs = []
5353
hostname = []
5454
inotify = []
@@ -73,7 +73,7 @@ term = []
7373
time = []
7474
ucontext = ["signal"]
7575
uio = []
76-
users = ["features"]
76+
user = ["feature"]
7777
zerocopy = ["fs", "uio"]
7878

7979
[dev-dependencies]

src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//! * `dir` - Stuff relating to directory iteration
1313
//! * `env` - Manipulate environment variables
1414
//! * `event` - Event-driven APIs, like `kqueue` and `epoll`
15-
//! * `features` - Query characteristics of the OS at runtime
15+
//! * `feature` - Query characteristics of the OS at runtime
1616
//! * `fs` - File system functionality
1717
//! * `hostname` - Get and set the system's hostname
1818
//! * `inotify` - Linux's `inotify` file system notification API
@@ -37,7 +37,7 @@
3737
//! * `time` - Query the operating system's clocks
3838
//! * `ucontext` - User thread context
3939
//! * `uio` - Vectored I/O
40-
//! * `users` - Stuff relating to users and groups
40+
//! * `user` - Stuff relating to users and groups
4141
//! * `zerocopy` - APIs like `sendfile` and `copy_file_range`
4242
#![crate_name = "nix"]
4343
#![cfg(unix)]
@@ -75,7 +75,7 @@ feature! {
7575
#[allow(missing_docs)]
7676
pub mod errno;
7777
feature! {
78-
#![feature = "features"]
78+
#![feature = "feature"]
7979

8080
#[deny(missing_docs)]
8181
pub mod features;

src/sys/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ feature! {
177177
}
178178

179179
feature! {
180-
#![feature = "features"]
180+
#![feature = "feature"]
181181
pub mod utsname;
182182
}
183183

src/unistd.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub use self::setres::*;
4545
pub use self::getres::*;
4646

4747
feature! {
48-
#![feature = "users"]
48+
#![feature = "user"]
4949

5050
/// User identifier
5151
///
@@ -591,7 +591,7 @@ pub fn symlinkat<P1: ?Sized + NixPath, P2: ?Sized + NixPath>(
591591

592592
// Double the buffer capacity up to limit. In case it already has
593593
// reached the limit, return Errno::ERANGE.
594-
#[cfg(any(feature = "fs", feature = "users"))]
594+
#[cfg(any(feature = "fs", feature = "user"))]
595595
fn reserve_double_buffer_size<T>(buf: &mut Vec<T>, limit: usize) -> Result<()> {
596596
use std::cmp::min;
597597

@@ -654,7 +654,7 @@ pub fn getcwd() -> Result<PathBuf> {
654654
}
655655

656656
feature! {
657-
#![all(feature = "users", feature = "fs")]
657+
#![all(feature = "user", feature = "fs")]
658658

659659
/// Computes the raw UID and GID values to pass to a `*chown` call.
660660
// The cast is not unnecessary on all platforms.
@@ -1348,7 +1348,7 @@ pub fn fdatasync(fd: RawFd) -> Result<()> {
13481348
}
13491349

13501350
feature! {
1351-
#![feature = "users"]
1351+
#![feature = "user"]
13521352

13531353
/// Get a real user ID
13541354
///
@@ -1432,7 +1432,7 @@ pub fn setgid(gid: Gid) -> Result<()> {
14321432
}
14331433

14341434
feature! {
1435-
#![all(feature = "fs", feature = "users")]
1435+
#![all(feature = "fs", feature = "user")]
14361436
/// Set the user identity used for filesystem checks per-thread.
14371437
/// On both success and failure, this call returns the previous filesystem user
14381438
/// ID of the caller.
@@ -1457,7 +1457,7 @@ pub fn setfsgid(gid: Gid) -> Gid {
14571457
}
14581458

14591459
feature! {
1460-
#![feature = "users"]
1460+
#![feature = "user"]
14611461

14621462
/// Get the list of supplementary group IDs of the calling process.
14631463
///
@@ -1868,7 +1868,7 @@ pub fn mkstemp<P: ?Sized + NixPath>(template: &P) -> Result<(RawFd, PathBuf)> {
18681868
}
18691869

18701870
feature! {
1871-
#![all(feature = "fs", feature = "features")]
1871+
#![all(feature = "fs", feature = "feature")]
18721872

18731873
/// Variable names for `pathconf`
18741874
///
@@ -2064,7 +2064,7 @@ pub fn pathconf<P: ?Sized + NixPath>(path: &P, var: PathconfVar) -> Result<Optio
20642064
}
20652065

20662066
feature! {
2067-
#![feature = "features"]
2067+
#![feature = "feature"]
20682068

20692069
/// Variable names for `sysconf`
20702070
///
@@ -2705,7 +2705,7 @@ mod pivot_root {
27052705
target_os = "openbsd"))]
27062706
mod setres {
27072707
feature! {
2708-
#![feature = "users"]
2708+
#![feature = "user"]
27092709

27102710
use crate::Result;
27112711
use crate::errno::Errno;
@@ -2752,7 +2752,7 @@ mod setres {
27522752
target_os = "openbsd"))]
27532753
mod getres {
27542754
feature! {
2755-
#![feature = "users"]
2755+
#![feature = "user"]
27562756

27572757
use crate::Result;
27582758
use crate::errno::Errno;
@@ -2846,7 +2846,7 @@ pub fn access<P: ?Sized + NixPath>(path: &P, amode: AccessFlags) -> Result<()> {
28462846
}
28472847

28482848
feature! {
2849-
#![feature = "users"]
2849+
#![feature = "user"]
28502850

28512851
/// Representation of a User, based on `libc::passwd`
28522852
///
@@ -3212,7 +3212,7 @@ pub fn ttyname(fd: RawFd) -> Result<PathBuf> {
32123212
}
32133213

32143214
feature! {
3215-
#![all(feature = "socket", feature = "users")]
3215+
#![all(feature = "socket", feature = "user")]
32163216

32173217
/// Get the effective user ID and group ID associated with a Unix domain socket.
32183218
///

0 commit comments

Comments
 (0)