From f64e8d99cd70ac36935bd7d96df2a6b07906578c Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Thu, 29 Sep 2022 19:53:07 +0200 Subject: [PATCH] Fix builder requiring fields that are optional/have defaults --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a0f85dc..a06bc34 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -83,15 +83,16 @@ pub enum ParseError { #[derive(Builder, Copy, Clone, Debug, Default)] pub struct GeoUri { /// The coordinate reference system used by the coordinates of this URI. + #[builder(default)] pub crs_id: CrsId, /// The latitude coordinate of a location. pub latitude: f64, /// The longitude coordinate of a location. pub longitude: f64, /// The altitude coordinate of a location, if provided. - #[builder(setter(strip_option))] + #[builder(default, setter(strip_option))] pub altitude: Option, - #[builder(setter(strip_option))] + #[builder(default, setter(strip_option))] /// The uncertainty around the location as a radius (distance) in meters. pub uncertainty: Option, }