We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef62bd commit 7b6ef70Copy full SHA for 7b6ef70
src/cache/intern.rs
@@ -68,6 +68,10 @@ cfg_if! {
68
/// However, there is a small cost to this caching, so you shouldn't cache every
69
/// string. Only cache strings which have a high likelihood of being sent
70
/// to JS multiple times.
71
+///
72
+/// Also, keep in mind that this function is a *performance hint*: it's not
73
+/// *guaranteed* that the string will be cached, and the caching strategy
74
+/// might change at any time, so don't rely upon it.
75
#[inline]
76
pub fn intern(s: &str) -> &str {
77
#[cfg(feature = "enable-interning")]
0 commit comments