提交 a4991484 编写于 作者: M Markus Unterwaditzer

Fix another occurrence of #22243

上级 dcc6ce2c
......@@ -212,7 +212,7 @@ pub fn memoized<T, U, S, F>(cache: &RefCell<HashMap<T, U, S>>, arg: T, f: F) ->
F: FnOnce(T) -> U,
{
let key = arg.clone();
let result = cache.borrow().get(&key).map(|result| result.clone());
let result = cache.borrow().get(&key).cloned();
match result {
Some(result) => result,
None => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册