Skip to content

Commit 13cb5d9

Browse files
Improve docs (#150)
* Set targets for docs rs to build for * Fix a typo
1 parent 4a0cfaa commit 13cb5d9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ bindgen = { version = "0.70.0", default-features = false, features = ["runtime"]
2727
[target.'cfg(any(target_os = "linux", target_os = "redox", target_os = "android"))'.dev-dependencies]
2828
procfs = "0.16.0"
2929
tempfile = "3.3.0"
30+
31+
# Build docs for macos and linux
32+
[package.metadata.docs.rs]
33+
targets = ["aarch64-apple-darwin", "x86_64-unknown-linux-gnu"]

src/libproc/pid_rusage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ pub fn pidrusage<T: PIDRUsage>(pid: i32) -> Result<T, String> {
384384
let flavor = T::flavor() as i32;
385385
let mut pidrusage = T::default();
386386
#[allow(clippy::pedantic)]
387-
let buffer_ptr = &mut pidrusage as *mut _ as *mut c_void;
387+
let buffer_ptr = &mut pidrusage as *mut _ as *mut c_void;
388388
let ret: i32;
389389

390390
unsafe {
@@ -403,7 +403,7 @@ pub fn pidrusage<T: PIDRUsage>(pid: i32) -> Result<T, String> {
403403
///
404404
/// # Errors
405405
///
406-
/// Will return `Err` if no process with PID `pid` esists, if the procfs file system cannot be
406+
/// Will return `Err` if no process with PID `pid` exists, if the procfs file system cannot be
407407
/// read or the information `VmSize` cannot be read from it for the process in question
408408
///
409409
/// # Examples

0 commit comments

Comments
 (0)