uucore: Remove mut of ProcessInformation::tty

This commit is contained in:
Krysztal Huang 2024-07-29 01:04:40 +08:00
parent eafed7ede4
commit c0081d33b7
No known key found for this signature in database
GPG key ID: 38820F4C51AF4A5F

View file

@ -245,7 +245,7 @@ impl ProcessInformation {
/// the result will contain [TerminalType::Unknown].
///
/// Otherwise [TerminalType::Unknown] does not appear in the result.
pub fn tty(&mut self) -> Teletype {
pub fn tty(&self) -> Teletype {
let path = PathBuf::from(format!("/proc/{}/fd", self.pid));
let Ok(result) = fs::read_dir(path) else {