Skip to content

Commit

Permalink
implement default for Brush
Browse files Browse the repository at this point in the history
also needed for parley
  • Loading branch information
dfrg committed Jan 25, 2024
1 parent 9e4c1bf commit df3a16e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/brush.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ impl From<Gradient> for Brush {
}
}

impl Default for Brush {
fn default() -> Self {
Self::Solid(Color::default())
}
}

/// Reference to a [brush](Brush).
///
/// This is useful for methods that would like to accept brushes by reference. Defining
Expand Down

0 comments on commit df3a16e

Please sign in to comment.