Skip to content

Commit e4b7e98

Browse files
committed
test(shim): fix CI formatting and cfg warnings
1 parent 4e68005 commit e4b7e98

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

crates/shim/src/cgroup.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,10 @@ pub fn update_resources(cgroup: &Cgroup, resources: &LinuxResources) -> Result<(
350350

351351
#[cfg(test)]
352352
mod tests {
353-
use std::error::Error as _;
354-
use std::path::PathBuf;
353+
use std::{error::Error as _, path::PathBuf};
355354

356355
use cgroups_rs::{
357-
fs::error::ErrorKind,
358-
fs::{hierarchies, Cgroup},
356+
fs::{error::ErrorKind, hierarchies, Cgroup},
359357
CgroupPid,
360358
};
361359

crates/shim/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub enum Error {
8989
Unimplemented(String),
9090
}
9191

92-
#[cfg(test)]
92+
#[cfg(all(test, target_os = "linux"))]
9393
pub(crate) fn is_permission_error(err: &Error) -> bool {
9494
match err {
9595
Error::IoError { err, .. } => err.kind() == std::io::ErrorKind::PermissionDenied,

0 commit comments

Comments
 (0)