new const trait syntax

This commit is contained in:
2025-11-10 22:10:38 -05:00
parent 1c49db1b89
commit ebff93bec9
4 changed files with 31 additions and 8 deletions

View File

@@ -44,8 +44,7 @@ impl<T: ColorNum> Color<T> {
}
}
#[const_trait]
pub trait F32Conversion {
pub const trait F32Conversion {
fn to(self) -> f32;
fn from(x: f32) -> Self;
}