diff options
| author | bors <bors@rust-lang.org> | 2024-04-10 04:47:56 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-10 04:47:56 +0000 | 
| commit | b14d8b2ef20c64c1002e2c6c724025c3d0846b91 (patch) | |
| tree | 2389b233581c0da8fc519b80e4a3edf55bf8d51a /library/std/src/io/stdio.rs | |
| parent | 1c77f7378e1894c3580046ba01791f2ed5a88ee3 (diff) | |
| parent | caf3766eafe5e77ea477282d682e9febe942878e (diff) | |
| download | rust-b14d8b2ef20c64c1002e2c6c724025c3d0846b91.tar.gz rust-b14d8b2ef20c64c1002e2c6c724025c3d0846b91.zip | |
Auto merge of #122812 - dtolnay:mode, r=workingjubilee
Show mode_t as octal in std::fs Debug impls
Example:
```rust
fn main() {
    println!("{:?}", std::fs::metadata("Cargo.toml").unwrap().permissions());
}
```
- Before: `Permissions(FilePermissions { mode: 33204 })`
- ~~After: `Permissions(FilePermissions { mode: 0o100664 })`~~
- After: `Permissions(FilePermissions { mode: 0o100664 (-rw-rw-r--) })`
~~I thought about using the format from `ls -l` (`-rw-rw-r--`, `drwxrwxr-x`) but I am not sure how transferable the meaning of the higher bits between different unix systems, and anyway starting the value with a leading negative-sign seems objectionable.~~
Diffstat (limited to 'library/std/src/io/stdio.rs')
0 files changed, 0 insertions, 0 deletions
