derive-new
derive-new copied to clipboard
error: calls in constants are limited to constant functions, struct and enum constructors
error: calls in constants are limited to constant functions, struct and enum constructors
How can I make the generated new() constructor const-fn?
E.g.:
#[derive(new, Copy, Clone)]
pub struct ColorHB {
hue: Hue,
#[new(value = "1.")]
brightness: f32,
}
@nrc Can you please make the generated new method a const-fn? :)