Mark simple functions const.

This commit is contained in:
Stephen Chung
2021-06-28 18:06:05 +08:00
parent 0c99165007
commit e40e81ac1a
16 changed files with 243 additions and 210 deletions

View File

@@ -38,7 +38,7 @@ impl FnPtr {
/// Get the name of the function.
#[inline(always)]
#[must_use]
pub(crate) fn get_fn_name(&self) -> &Identifier {
pub(crate) const fn get_fn_name(&self) -> &Identifier {
&self.0
}
/// Get the underlying data of the function pointer.