File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
381381 where
382382 T : Copy ,
383383 {
384- self . with ( |cell| cell . get ( ) )
384+ self . with ( Cell :: get)
385385 }
386386
387387 /// Takes the contained value, leaving `Default::default()` in its place.
@@ -411,7 +411,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
411411 where
412412 T : Default ,
413413 {
414- self . with ( |cell| cell . take ( ) )
414+ self . with ( Cell :: take)
415415 }
416416
417417 /// Replaces the contained value, returning the old value.
@@ -582,7 +582,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
582582 where
583583 T : Default ,
584584 {
585- self . with ( |cell| cell . take ( ) )
585+ self . with ( RefCell :: take)
586586 }
587587
588588 /// Replaces the contained value, returning the old value.
You can’t perform that action at this time.
0 commit comments