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