Skip to content

Commit 29b319b

Browse files
committed
Change current_pid to just id.
1 parent ba75758 commit 29b319b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/libstd/process.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,14 +1174,15 @@ pub fn abort() -> ! {
11741174
/// Basic usage:
11751175
///
11761176
/// ```no_run
1177-
/// use std::process::current_pid;
1177+
/// #![feature(getpid)]
1178+
/// use std::process;
11781179
///
1179-
/// println!("My pid is {}", current_pid());
1180+
/// println!("My pid is {}", process::id());
11801181
/// ```
11811182
///
11821183
///
11831184
#[unstable(feature = "getpid", issue = "44971", reason = "recently added")]
1184-
pub fn current_pid() -> u32 {
1185+
pub fn id() -> u32 {
11851186
::sys::os::getpid()
11861187
}
11871188

0 commit comments

Comments
 (0)