Add a couple trivial const fn conversions

This commit is contained in:
CAD97 2021-07-04 17:42:39 -05:00
parent 0312981a4f
commit e77a97e854
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ pub struct Dynamic {
impl Dynamic {
/// A dynamic size equal to `value`.
#[inline]
pub fn new(value: usize) -> Self {
pub const fn new(value: usize) -> Self {
Self { value }
}
}

View File

@ -221,7 +221,7 @@ impl<T: Normed> Unit<T> {
impl<T> Unit<T> {
/// Wraps the given value, assuming it is already normalized.
#[inline]
pub fn new_unchecked(value: T) -> Self {
pub const fn new_unchecked(value: T) -> Self {
Unit { value }
}