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/anstyle | |
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/anstyle')
-rw-r--r-- | vendor/anstyle/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/anstyle/Cargo.lock | 2 | ||||
-rw-r--r-- | vendor/anstyle/Cargo.toml | 2 | ||||
-rw-r--r-- | vendor/anstyle/src/color.rs | 68 | ||||
-rw-r--r-- | vendor/anstyle/src/style.rs | 74 |
5 files changed, 4 insertions, 144 deletions
diff --git a/vendor/anstyle/.cargo-checksum.json b/vendor/anstyle/.cargo-checksum.json index 94599f8a6..c49381758 100644 --- a/vendor/anstyle/.cargo-checksum.json +++ b/vendor/anstyle/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.lock":"cc9c7ab508ed9de11c4a7a6c43ac06871a027ed9e203d886389e1b7bad3e2281","Cargo.toml":"14a6cd57c0969cd5a0262412a3fc1ce01ba024d204ccc26f03bdcfa6ba067f99","LICENSE-APACHE":"c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08","LICENSE-MIT":"3dad3b7606dec7ce40f54546e0dd485aeb52a45d4fcdfdaf830fd8349bbe43a5","README.md":"dcb157ba695dd8f1572944cc5bf84b8f67f8bb73925a5b725a9e274c755ce1a6","examples/dump.rs":"8ccbdc02b3f939109e436c26cf7550a75d0cb6aefb59ae6ae6a59b61f0d358b4","src/color.rs":"2b1d59aa6419c28cf99bcc13464c59e8a445b9dd5051183fd6190f805e9dc5fa","src/effect.rs":"c622c5472ba34d368a25341ce9488674b1e8516704aba80ae308e04b28136cd5","src/lib.rs":"0106395ba7263dbee67458e5ff4038cab493a3d34f3dcf0cb75504b1531a58e1","src/macros.rs":"0c90b45626fe8331d5b3326abb831f4ba6e04bcc975b1b9c01e465715050caa2","src/reset.rs":"65658e159fdf8f018bcfe6fdcfff688dbc4f3579fe1c685abdf92af6267165f8","src/style.rs":"a5153bd15463f6cb4b814e24177decb647454f31f087568d088740f8a4eb9fea"},"package":"23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2"}
\ No newline at end of file +{"files":{"Cargo.lock":"8e369dc1909edb655963e5b0a2b1d182a96a8b114b65f84e353a1cd3a6ba06e8","Cargo.toml":"2865988fea7fbb7a54ef96cb05d5391b2f507265582fc850c92dd0e2c34786d5","LICENSE-APACHE":"c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08","LICENSE-MIT":"3dad3b7606dec7ce40f54546e0dd485aeb52a45d4fcdfdaf830fd8349bbe43a5","README.md":"dcb157ba695dd8f1572944cc5bf84b8f67f8bb73925a5b725a9e274c755ce1a6","examples/dump.rs":"8ccbdc02b3f939109e436c26cf7550a75d0cb6aefb59ae6ae6a59b61f0d358b4","src/color.rs":"5c97b3a38d54e2a3101ba551d2b641d8ef708f7726c3527cbabdbd3e96184757","src/effect.rs":"c622c5472ba34d368a25341ce9488674b1e8516704aba80ae308e04b28136cd5","src/lib.rs":"0106395ba7263dbee67458e5ff4038cab493a3d34f3dcf0cb75504b1531a58e1","src/macros.rs":"0c90b45626fe8331d5b3326abb831f4ba6e04bcc975b1b9c01e465715050caa2","src/reset.rs":"65658e159fdf8f018bcfe6fdcfff688dbc4f3579fe1c685abdf92af6267165f8","src/style.rs":"f17ae53e38a3551ee8e3092f259aadfafabd3103e2db7fb3af291241dc6b8f46"},"package":"41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"}
\ No newline at end of file diff --git a/vendor/anstyle/Cargo.lock b/vendor/anstyle/Cargo.lock index 14542825e..ed114e5b4 100644 --- a/vendor/anstyle/Cargo.lock +++ b/vendor/anstyle/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "anstyle" -version = "0.3.5" +version = "1.0.0" dependencies = [ "lexopt", ] diff --git a/vendor/anstyle/Cargo.toml b/vendor/anstyle/Cargo.toml index 70e550ec6..946592b11 100644 --- a/vendor/anstyle/Cargo.toml +++ b/vendor/anstyle/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.64.0" name = "anstyle" -version = "0.3.5" +version = "1.0.0" include = [ "build.rs", "src/**/*", diff --git a/vendor/anstyle/src/color.rs b/vendor/anstyle/src/color.rs index b56d13ebd..40fa7dfa9 100644 --- a/vendor/anstyle/src/color.rs +++ b/vendor/anstyle/src/color.rs @@ -119,23 +119,6 @@ impl From<(u8, u8, u8)> for Color { } } -/// Define style with specified foreground color and effects -/// -/// # Examples -/// -/// ```rust -/// let fg = anstyle::Color::from((0, 0, 0)); -/// let style = fg | anstyle::Effects::BOLD | anstyle::Effects::UNDERLINE; -/// ``` -impl core::ops::BitOr<crate::Effects> for Color { - type Output = crate::Style; - - #[inline(always)] - fn bitor(self, rhs: crate::Effects) -> Self::Output { - crate::Style::new().fg_color(Some(self)) | rhs - } -} - /// Available 4-bit ANSI color palette codes /// /// The user's terminal defines the meaning of the each palette code. @@ -337,23 +320,6 @@ impl AnsiColor { } } -/// Define style with specified foreground color and effects -/// -/// # Examples -/// -/// ```rust -/// let fg = anstyle::AnsiColor::Black; -/// let style = fg | anstyle::Effects::BOLD | anstyle::Effects::UNDERLINE; -/// ``` -impl core::ops::BitOr<crate::Effects> for AnsiColor { - type Output = crate::Style; - - #[inline(always)] - fn bitor(self, rhs: crate::Effects) -> Self::Output { - crate::Style::new().fg_color(Some(self.into())) | rhs - } -} - /// 256 (8-bit) color support /// /// - `0..16` are [`AnsiColor`] palette codes @@ -479,23 +445,6 @@ impl From<AnsiColor> for Ansi256Color { } } -/// Define style with specified foreground color and effects -/// -/// # Examples -/// -/// ```rust -/// let fg = anstyle::Ansi256Color(0); -/// let style = fg | anstyle::Effects::BOLD | anstyle::Effects::UNDERLINE; -/// ``` -impl core::ops::BitOr<crate::Effects> for Ansi256Color { - type Output = crate::Style; - - #[inline(always)] - fn bitor(self, rhs: crate::Effects) -> Self::Output { - crate::Style::new().fg_color(Some(self.into())) | rhs - } -} - /// 24-bit ANSI RGB color codes #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct RgbColor(pub u8, pub u8, pub u8); @@ -587,23 +536,6 @@ impl From<(u8, u8, u8)> for RgbColor { } } -/// Define style with specified foreground color and effects -/// -/// # Examples -/// -/// ```rust -/// let fg = anstyle::RgbColor(0, 0, 0); -/// let style = fg | anstyle::Effects::BOLD | anstyle::Effects::UNDERLINE; -/// ``` -impl core::ops::BitOr<crate::Effects> for RgbColor { - type Output = crate::Style; - - #[inline(always)] - fn bitor(self, rhs: crate::Effects) -> Self::Output { - crate::Style::new().fg_color(Some(self.into())) | rhs - } -} - #[derive(Default, Debug)] struct DisplayBuffer { buffer: [u8; 19], diff --git a/vendor/anstyle/src/style.rs b/vendor/anstyle/src/style.rs index 623d7c732..e0cad29d2 100644 --- a/vendor/anstyle/src/style.rs +++ b/vendor/anstyle/src/style.rs @@ -290,62 +290,6 @@ impl Style { } } -/// Define style with specified foreground color -/// -/// # Examples -/// -/// ```rust -/// let style: anstyle::Style = anstyle::Color::from((0, 0, 0)).into(); -/// ``` -impl From<crate::Color> for Style { - #[inline] - fn from(color: crate::Color) -> Self { - Self::new().fg_color(Some(color)) - } -} - -/// Define style with specified foreground color -/// -/// # Examples -/// -/// ```rust -/// let style: anstyle::Style = anstyle::AnsiColor::Black.into(); -/// ``` -impl From<crate::AnsiColor> for Style { - #[inline] - fn from(color: crate::AnsiColor) -> Self { - Self::new().fg_color(Some(color.into())) - } -} - -/// Define style with specified foreground color -/// -/// # Examples -/// -/// ```rust -/// let style: anstyle::Style = anstyle::Ansi256Color(0).into(); -/// ``` -impl From<crate::Ansi256Color> for Style { - #[inline] - fn from(color: crate::Ansi256Color) -> Self { - Self::new().fg_color(Some(color.into())) - } -} - -/// Define style with specified foreground color -/// -/// # Examples -/// -/// ```rust -/// let style: anstyle::Style = anstyle::RgbColor(0, 0, 0).into(); -/// ``` -impl From<crate::RgbColor> for Style { - #[inline] - fn from(color: crate::RgbColor) -> Self { - Self::new().fg_color(Some(color.into())) - } -} - /// # Examples /// /// ```rust @@ -417,26 +361,10 @@ impl core::ops::SubAssign<crate::Effects> for Style { /// # Examples /// /// ```rust -/// let color = anstyle::RgbColor(0, 0, 0); -/// assert_eq!(anstyle::Style::new().fg_color(Some(color.into())), color); -/// assert_ne!(color | anstyle::Effects::BOLD, color); -/// ``` -impl<C: Into<crate::Color> + Clone> core::cmp::PartialEq<C> for Style { - #[inline] - fn eq(&self, other: &C) -> bool { - let other = other.clone().into(); - let other = Self::from(other); - *self == other - } -} - -/// # Examples -/// -/// ```rust /// let effects = anstyle::Effects::BOLD; /// assert_eq!(anstyle::Style::new().effects(effects), effects); /// assert_ne!(anstyle::Effects::UNDERLINE | effects, effects); -/// assert_ne!(anstyle::RgbColor(0, 0, 0) | effects, effects); +/// assert_ne!(anstyle::RgbColor(0, 0, 0).on_default() | effects, effects); /// ``` impl core::cmp::PartialEq<crate::Effects> for Style { #[inline] |