From 31664843874d20299b01152cd7eeca22fc634e25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Apr 2022 07:31:22 +0000 Subject: [PATCH 1/2] build(deps): bump rlimit from 0.4.0 to 0.8.3 Bumps [rlimit](https://github.com/Nugine/rlimit) from 0.4.0 to 0.8.3. - [Release notes](https://github.com/Nugine/rlimit/releases) - [Changelog](https://github.com/Nugine/rlimit/blob/master/CHANGELOG.md) - [Commits](https://github.com/Nugine/rlimit/compare/v0.4.0...v0.8.3) --- updated-dependencies: - dependency-name: rlimit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 5 ++--- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5b78da651..1dccbaafb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1685,11 +1685,10 @@ dependencies = [ [[package]] name = "rlimit" -version = "0.4.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b02d62c38353a6fce45c25ca19783e25dd5f495ca681c674a4ee15aa4c1536" +checksum = "f7278a1ec8bfd4a4e07515c589f5ff7b309a373f987393aef44813d9dcf87aa3" dependencies = [ - "cfg-if 0.1.10", "libc", ] diff --git a/Cargo.toml b/Cargo.toml index c2737d475..e79b7e932 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -384,7 +384,7 @@ atty = "0.2" hex-literal = "0.3.1" [target.'cfg(target_os = "linux")'.dev-dependencies] -rlimit = "0.4.0" +rlimit = "0.8.3" [target.'cfg(unix)'.dev-dependencies] nix = "0.23.1" From 991672a030dabce7a1c8ec8781f5ac4cf0c104fb Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 12 Apr 2022 09:18:29 +0200 Subject: [PATCH 2/2] Adjust rlimit usage with the new version --- tests/common/util.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/common/util.rs b/tests/common/util.rs index ae93af20d..bf7143bb5 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -3,13 +3,13 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. -//spell-checker: ignore (linux) rlimit prlimit Rlim coreutil ggroups +//spell-checker: ignore (linux) rlimit prlimit coreutil ggroups #![allow(dead_code)] use pretty_assertions::assert_eq; #[cfg(target_os = "linux")] -use rlimit::{prlimit, rlim}; +use rlimit::prlimit; #[cfg(unix)] use std::borrow::Cow; use std::env; @@ -893,7 +893,7 @@ pub struct UCommand { stderr: Option, bytes_into_stdin: Option>, #[cfg(target_os = "linux")] - limits: Vec<(rlimit::Resource, rlim, rlim)>, + limits: Vec<(rlimit::Resource, u64, u64)>, } impl UCommand { @@ -1046,8 +1046,8 @@ impl UCommand { pub fn with_limit( &mut self, resource: rlimit::Resource, - soft_limit: rlim, - hard_limit: rlim, + soft_limit: u64, + hard_limit: u64, ) -> &mut Self { self.limits.push((resource, soft_limit, hard_limit)); self