diff --git a/CHANGELOG.md b/CHANGELOG.md index c19be54f..c39732af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [3.6.0] (2023-01-30) + +- OpenCloudOS support has been added. (#328) + +- openEuler support has been added. (#328) + +- Arch Linux ARM and Debian ARM detection has been improved. (#331) + ## [3.5.1] (2022-09-19) - Windows 11 detection has been fixed. (#322) @@ -273,7 +281,8 @@ All notable changes to this project will be documented in this file. The first release containing only minor infrastructural changes and based on [os_type](https://github.com/schultyy/os_type). -[Unreleased]: https://github.com/stanislav-tkach/os_info/compare/v3.5.1...HEAD +[Unreleased]: https://github.com/stanislav-tkach/os_info/compare/v3.6.0...HEAD +[3.6.0]: https://github.com/stanislav-tkach/os_info/compare/v3.5.1...v3.6.0 [3.5.1]: https://github.com/stanislav-tkach/os_info/compare/v3.5.0...v3.5.1 [3.5.0]: https://github.com/stanislav-tkach/os_info/compare/v3.4.0...v3.5.0 [3.4.0]: https://github.com/stanislav-tkach/os_info/compare/v3.3.0...v3.4.0 diff --git a/README.md b/README.md index b58f7b23..19c25618 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ os_info = { version = "3", default-features = false } let info = os_info::get(); // Print full information: -println!("OS information: {}", info); +println!("OS information: {info}"); // Print information separately: println!("Type: {}", info.os_type()); diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 34ca9208..7e4fc4ca 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -18,7 +18,7 @@ name = "os_info" path = "src/main.rs" [dependencies] -os_info = { version = "3.5.1", default-features = false, path = "../os_info" } +os_info = { version = "3.6.0", default-features = false, path = "../os_info" } log = "0.4.5" env_logger = "0.10" clap = { version = "4", features = ["derive"] } diff --git a/cspell-dictionary.txt b/cspell-dictionary.txt index 1f6f3872..1eb87c01 100644 --- a/cspell-dictionary.txt +++ b/cspell-dictionary.txt @@ -2,6 +2,7 @@ aarch64 almalinux antergos aosc +archarm artix bitness centos diff --git a/os_info/Cargo.toml b/os_info/Cargo.toml index 5c82de6d..9907ca0a 100644 --- a/os_info/Cargo.toml +++ b/os_info/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "os_info" -version = "3.5.1" +version = "3.6.0" authors = ["Jan Schulte ", "Stanislav Tkach "] description = "Detect the operating system type and version." documentation = "https://docs.rs/os_info" diff --git a/os_info/examples/print_version.rs b/os_info/examples/print_version.rs index 0047fbcc..92065647 100644 --- a/os_info/examples/print_version.rs +++ b/os_info/examples/print_version.rs @@ -2,7 +2,7 @@ fn main() { let info = os_info::get(); // Print full information: - println!("OS information: {}", info); + println!("OS information: {info}"); // Print information separately: println!("Type: {}", info.os_type()); diff --git a/os_info/src/info.rs b/os_info/src/info.rs index a4f1e510..35fe4aec 100644 --- a/os_info/src/info.rs +++ b/os_info/src/info.rs @@ -15,7 +15,7 @@ use super::{Bitness, Type, Version}; /// use os_info; /// /// let info = os_info::get(); -/// println!("OS information: {}", info); +/// println!("OS information: {info}"); /// ``` #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] @@ -162,10 +162,10 @@ impl Display for Info { write!(f, " {}", self.version)?; } if let Some(ref edition) = self.edition { - write!(f, " ({})", edition)?; + write!(f, " ({edition})")?; } if let Some(ref codename) = self.codename { - write!(f, " ({})", codename)?; + write!(f, " ({codename})")?; } write!(f, " [{}]", self.bitness) } diff --git a/os_info/src/lib.rs b/os_info/src/lib.rs index a1a6746e..0841b62e 100644 --- a/os_info/src/lib.rs +++ b/os_info/src/lib.rs @@ -7,7 +7,7 @@ missing_debug_implementations, missing_docs, unsafe_code, - missing_doc_code_examples + rustdoc::missing_doc_code_examples )] #[cfg(target_os = "android")] @@ -97,7 +97,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()); diff --git a/os_info/src/os_type.rs b/os_info/src/os_type.rs index 13eac0fd..0e633af7 100644 --- a/os_info/src/os_type.rs +++ b/os_info/src/os_type.rs @@ -108,7 +108,7 @@ impl Display for Type { Type::Redhat => write!(f, "Red Hat Linux"), Type::RedHatEnterprise => write!(f, "Red Hat Enterprise Linux"), Type::SUSE => write!(f, "SUSE Linux Enterprise Server"), - _ => write!(f, "{:?}", self), + _ => write!(f, "{self:?}"), } } } diff --git a/os_info/src/version.rs b/os_info/src/version.rs index 20a2c4a6..578464c6 100644 --- a/os_info/src/version.rs +++ b/os_info/src/version.rs @@ -55,15 +55,15 @@ impl Display for Version { fn fmt(&self, f: &mut Formatter) -> fmt::Result { match *self { Self::Unknown => f.write_str("Unknown"), - Self::Semantic(major, minor, patch) => write!(f, "{}.{}.{}", major, minor, patch), + Self::Semantic(major, minor, patch) => write!(f, "{major}.{minor}.{patch}"), Self::Rolling(ref date) => { let date = match date { - Some(date) => format!(" ({})", date), + Some(date) => format!(" ({date})"), None => "".to_owned(), }; - write!(f, "Rolling Release{}", date) + write!(f, "Rolling Release{date}") } - Self::Custom(ref version) => write!(f, "{}", version), + Self::Custom(ref version) => write!(f, "{version}"), } } }