Skip to content

Commit 0e599a6

Browse files
author
Robert Bastian
committed
fix
1 parent eca6331 commit 0e599a6

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
@@ -519,8 +519,6 @@ mod cgroups {
519519
//! * paths containing control characters or spaces, since those would be escaped in procfs
520520
//! output and we don't unescape
521521
522-
use str::from_utf8;
523-
524522
use crate::borrow::Cow;
525523
use crate::ffi::OsString;
526524
use crate::fs::{File, exists};
@@ -555,7 +553,7 @@ mod cgroups {
555553
let version = match fields.nth(1) {
556554
Some(b"") => Cgroup::V2,
557555
Some(controllers)
558-
if from_utf8(controllers)
556+
if str::from_utf8(controllers)
559557
.is_ok_and(|c| c.split(',').any(|c| c == "cpu")) =>
560558
{
561559
Cgroup::V1

0 commit comments

Comments
 (0)