summaryrefslogtreecommitdiff
path: root/src/geom
diff options
context:
space:
mode:
Diffstat (limited to 'src/geom')
-rw-r--r--src/geom/paint.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/geom/paint.rs b/src/geom/paint.rs
index a3a9b0be..4a7c9e19 100644
--- a/src/geom/paint.rs
+++ b/src/geom/paint.rs
@@ -181,8 +181,14 @@ impl FromStr for RgbaColor {
}
impl From<SynColor> for RgbaColor {
- fn from(color: SynColor) -> Self {
- Self::new(color.r, color.g, color.b, color.a)
+ fn from(SynColor { r, g, b, a }: SynColor) -> Self {
+ Self { r, g, b, a }
+ }
+}
+
+impl From<RgbaColor> for SynColor {
+ fn from(RgbaColor { r, g, b, a }: RgbaColor) -> Self {
+ Self { r, g, b, a }
}
}