diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/os_info/src/lib.rs | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/os_info/src/lib.rs')
-rw-r--r-- | vendor/os_info/src/lib.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/os_info/src/lib.rs b/vendor/os_info/src/lib.rs index a1a6746ec..83c7f3875 100644 --- a/vendor/os_info/src/lib.rs +++ b/vendor/os_info/src/lib.rs @@ -70,6 +70,13 @@ mod imp; #[path = "unknown/mod.rs"] mod imp; +#[cfg(any( + target_os = "linux", + target_os = "macos", + target_os = "netbsd", + target_os = "openbsd" +))] +mod architecture; mod bitness; mod info; #[cfg(not(windows))] @@ -97,7 +104,7 @@ pub use crate::{bitness::Bitness, info::Info, os_type::Type, version::Version}; /// let info = os_info::get(); /// /// // Print full information: -/// println!("OS information: {}", info); +/// println!("OS information: {info}"); /// /// // Print information separately: /// println!("Type: {}", info.os_type()); @@ -105,6 +112,7 @@ pub use crate::{bitness::Bitness, info::Info, os_type::Type, version::Version}; /// println!("Edition: {:?}", info.edition()); /// println!("Codename: {:?}", info.codename()); /// println!("Bitness: {}", info.bitness()); +/// println!("Architecture: {:?}", info.architecture()); /// ``` pub fn get() -> Info { imp::current_platform() |