constify checked_abs

This commit is contained in:
Trevor Spiteri 2021-02-01 12:10:40 +01:00
parent 88165c4909
commit b5c0c6adea
1 changed files with 1 additions and 1 deletions

View File

@ -985,7 +985,7 @@ assert_eq!(Fix::MIN.checked_abs(), None);
[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None
";
#[inline]
pub fn checked_abs(self) -> Option<$Fixed<Frac>> {
pub const fn checked_abs(self) -> Option<$Fixed<Frac>> {
match self.to_bits().checked_abs() {
None => None,
Some(bits) => Some(Self::from_bits(bits)),