Skip to content

Commit 389185e

Browse files
committed
Lower limits in setrlimit example
The current value causes the doc test to fail on Fedora 34 for unprivileged users.
1 parent e94bf0e commit 389185e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sys/resource.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ pub fn getrlimit(resource: Resource) -> Result<(Option<rlim_t>, Option<rlim_t>)>
200200
/// ```
201201
/// # use nix::sys::resource::{setrlimit, Resource};
202202
///
203-
/// let soft_limit = Some(1024);
204-
/// let hard_limit = Some(1048576);
203+
/// let soft_limit = Some(512);
204+
/// let hard_limit = Some(1024);
205205
/// setrlimit(Resource::RLIMIT_NOFILE, soft_limit, hard_limit).unwrap();
206206
/// ```
207207
///

0 commit comments

Comments
 (0)