diff options
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() |