diff --git a/examples/markup.rs b/examples/markup.rs index 873dd0e..8d4d8ab 100644 --- a/examples/markup.rs +++ b/examples/markup.rs @@ -15,7 +15,7 @@ fn main() { styled.append(StyledString::styled("that ", Color::Dark(BaseColor::Red))); styled.append(StyledString::styled( "cool?", - Style::from(Color::Light(BaseColor::Blue)).add(Effect::Bold), + Style::from(Color::Light(BaseColor::Blue)).combine(Effect::Bold), )); // TextView can natively accept StyledString. diff --git a/src/cursive.rs b/src/cursive.rs index 28cc19a..5d5aa6f 100644 --- a/src/cursive.rs +++ b/src/cursive.rs @@ -383,7 +383,7 @@ impl Cursive { { self.global_callbacks .entry(event.into()) - .or_insert(Vec::new()) + .or_insert_with(Vec::new) .push(Callback::from_fn(cb)); } diff --git a/src/theme/palette.rs b/src/theme/palette.rs index a2915d6..4273839 100644 --- a/src/theme/palette.rs +++ b/src/theme/palette.rs @@ -90,7 +90,7 @@ pub(crate) fn load_table(palette: &mut Palette, table: &toml::value::Table) { /// Color entry in a palette. /// -/// Each ColorRole is used for a specific role in a default application. +/// Each `ColorRole` is used for a specific role in a default application. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, EnumMap)] pub enum PaletteColor { /// Color used for the application background. diff --git a/src/theme/style.rs b/src/theme/style.rs index 877d266..af5e87c 100644 --- a/src/theme/style.rs +++ b/src/theme/style.rs @@ -51,7 +51,7 @@ impl Style { } /// Returns a combination of `self` and `other`. - pub fn add(self, other: S) -> Self + pub fn combine(self, other: S) -> Self where S: Into