summaryrefslogtreecommitdiffstats
path: root/vendor/anstyle/src/style.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/anstyle/src/style.rs')
-rw-r--r--vendor/anstyle/src/style.rs74
1 files changed, 1 insertions, 73 deletions
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]