We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eee1d47 commit 4ecb69eCopy full SHA for 4ecb69e
library/std/src/sys/pal/unix/thread.rs
@@ -521,8 +521,6 @@ mod cgroups {
521
//! * paths containing control characters or spaces, since those would be escaped in procfs
522
//! output and we don't unescape
523
524
- use str::from_utf8;
525
-
526
use crate::borrow::Cow;
527
use crate::ffi::OsString;
528
use crate::fs::{File, exists};
@@ -557,7 +555,7 @@ mod cgroups {
557
555
let version = match fields.nth(1) {
558
556
Some(b"") => Cgroup::V2,
559
Some(controllers)
560
- if from_utf8(controllers)
+ if str::from_utf8(controllers)
561
.is_ok_and(|c| c.split(',').any(|c| c == "cpu")) =>
562
{
563
Cgroup::V1
0 commit comments