Skip to content

Commit 38d9388

Browse files
Robert Bastianrobertbastian
Robert Bastian
authored andcommitted
fix
1 parent a3797ff commit 38d9388

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

library/std/src/sys/pal/unix/thread.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,6 @@ mod cgroups {
524524
//! * paths containing control characters or spaces, since those would be escaped in procfs
525525
//! output and we don't unescape
526526
527-
use str::from_utf8;
528-
529527
use crate::borrow::Cow;
530528
use crate::ffi::OsString;
531529
use crate::fs::{File, exists};
@@ -560,7 +558,7 @@ mod cgroups {
560558
let version = match fields.nth(1) {
561559
Some(b"") => Cgroup::V2,
562560
Some(controllers)
563-
if from_utf8(controllers)
561+
if str::from_utf8(controllers)
564562
.is_ok_and(|c| c.split(',').any(|c| c == "cpu")) =>
565563
{
566564
Cgroup::V1

0 commit comments

Comments
 (0)