You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cached macro currently cannot support arg: &T out of the box, due to it's implementation which leads to borrowed data escaping the fn body, when the key type is set to &T
Also, because Option<&T>::clone() returns Option<&T> rather than an owned type, to support Option<&T> as an input requires:
the macro impl to call Option::cloned() instead of Option::clone().
The key type be Option<T> instead of Option<&T> and Option<&T>.cloned() needs to be called instead of Option<&T>.clone().
After an initial look at the problem I think here we want to call some function which goes through the input_tys and makes this conversion, noting the names of those inputs, so that we call cloned() instad of clone() on those inputs.
The text was updated successfully, but these errors were encountered:
The cached macro currently cannot support
arg: &T
out of the box, due to it's implementation which leads to borrowed data escaping the fn body, when the key type is set to&T
Also, because
Option<&T>::clone()
returnsOption<&T>
rather than an owned type, to supportOption<&T>
as an input requires:Option<T>
instead ofOption<&T>
andOption<&T>.cloned()
needs to be called instead ofOption<&T>.clone()
.After an initial look at the problem I think here we want to call some function which goes through the input_tys and makes this conversion, noting the names of those inputs, so that we call cloned() instad of clone() on those inputs.
The text was updated successfully, but these errors were encountered: