summaryrefslogtreecommitdiff
path: root/engine/src/util.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-05-22 20:22:45 +0200
committerHampusM <hampus@hampusmat.com>2024-05-22 20:22:45 +0200
commitd9ab0016c8477f05a22ed569c0a70a5e9d68c3bb (patch)
tree1d0bd28dbefd042be265c2f2c63f580212290645 /engine/src/util.rs
parentd89c554388bfa6e325f03c53bc4bf2129a7df9b0 (diff)
refactor(engine): make PointLight non-exhaustive & add builder
Diffstat (limited to 'engine/src/util.rs')
-rw-r--r--engine/src/util.rs12
1 files changed, 12 insertions, 0 deletions
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,
+ )*
+ }
+ }
+ }
};
}