proxmox/proxmox-sys
Maximiliano Sandoval R 430df21720 sys: Use safe wrapper for libc::isatty
Use the `std::io::IsTerminal` trait introduced in Rust 1.70.

Internally it calls `libc::isatty`, see [1, 2]. Note that it switches
the comparison from `== 1` to `!= 0` which shouldn't make a difference
assuming that libc::isatty upholds the promises made in its man page.

The MSRV was set on the workspace to reflect this change.

[1] https://doc.rust-lang.org/src/std/io/stdio.rs.html#1079
[2] https://doc.rust-lang.org/src/std/sys/unix/io.rs.html#79

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-02-16 16:55:58 +01:00
..
debian bump proxmox-sys to 0.5.3-1 2024-01-08 12:48:57 +01:00
src sys: Use safe wrapper for libc::isatty 2024-02-16 16:55:58 +01:00
tests sys: rust fmt 2022-04-10 17:39:31 +02:00
Cargo.toml bump proxmox-sys to 0.5.3-1 2024-01-08 12:48:57 +01:00