From d9ab0016c8477f05a22ed569c0a70a5e9d68c3bb Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 22 May 2024 20:22:45 +0200 Subject: refactor(engine): make PointLight non-exhaustive & add builder --- engine/src/util.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'engine/src/util.rs') diff --git a/engine/src/util.rs b/engine/src/util.rs index 409b98f..532bdee 100644 --- a/engine/src/util.rs +++ b/engine/src/util.rs @@ -77,6 +77,18 @@ macro_rules! builder { } } } + + impl From<$name> for $builder_name + { + fn from(built: $name) -> Self + { + Self { + $( + $field: built.$field, + )* + } + } + } }; } -- cgit v1.2.3-18-g5258