summaryrefslogtreecommitdiffstats
path: root/vendor/os_info/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/os_info/src/lib.rs
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-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.rs10
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()