diff options
| author | Josh Stone <jistone@redhat.com> | 2024-09-24 14:25:16 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2024-09-24 14:25:16 -0700 |
| commit | 0999b019f8e0a96ca7aac9fd5ec095d59b0806ec (patch) | |
| tree | 6bba5c63e251caa7a1aa28b8636324b620fc483c /library/std/src/sys | |
| parent | 1e9a50dde8fe417348a9e4c74787975527502ec3 (diff) | |
| download | rust-0999b019f8e0a96ca7aac9fd5ec095d59b0806ec.tar.gz rust-0999b019f8e0a96ca7aac9fd5ec095d59b0806ec.zip | |
Dogfood `feature(file_buffered)`
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/pal/unix/thread.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index 7fe9b6c3e52..ce5e8ea5866 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -517,7 +517,7 @@ mod cgroups { use crate::borrow::Cow; use crate::ffi::OsString; use crate::fs::{File, exists}; - use crate::io::{BufRead, BufReader, Read}; + use crate::io::{BufRead, Read}; use crate::os::unix::ffi::OsStringExt; use crate::path::{Path, PathBuf}; use crate::str::from_utf8; @@ -690,7 +690,7 @@ mod cgroups { /// If the cgroupfs is a bind mount then `group_path` is adjusted to skip /// over the already-included prefix fn find_mountpoint(group_path: &Path) -> Option<(Cow<'static, str>, &Path)> { - let mut reader = BufReader::new(File::open("/proc/self/mountinfo").ok()?); + let mut reader = File::open_buffered("/proc/self/mountinfo").ok()?; let mut line = String::with_capacity(256); loop { line.clear(); |
