Make FnPtr::fn_name_raw const.

This commit is contained in:
Stephen Chung
2021-06-29 21:47:27 +08:00
parent 0346bb874b
commit d146de4ff9
4 changed files with 18 additions and 5 deletions

View File

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