Split out strings interner.

This commit is contained in:
Stephen Chung
2021-12-27 21:56:50 +08:00
parent 7a15071e4e
commit 4d226542fa
7 changed files with 241 additions and 136 deletions

View File

@@ -1013,16 +1013,16 @@ impl Default for Engine {
#[cfg(not(feature = "no_object"))]
#[inline]
#[must_use]
pub fn make_getter(id: impl AsRef<str>) -> String {
format!("{}{}", FN_GET, id.as_ref())
pub fn make_getter(id: &str) -> String {
format!("{}{}", FN_GET, id)
}
/// Make setter function
#[cfg(not(feature = "no_object"))]
#[inline]
#[must_use]
pub fn make_setter(id: impl AsRef<str>) -> String {
format!("{}{}", FN_SET, id.as_ref())
pub fn make_setter(id: &str) -> String {
format!("{}{}", FN_SET, id)
}
/// Is this function an anonymous function?