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>> {
381
381
where
382
382
T : Copy ,
383
383
{
384
- self . with ( |cell| cell . get ( ) )
384
+ self . with ( Cell :: get)
385
385
}
386
386
387
387
/// Takes the contained value, leaving `Default::default()` in its place.
@@ -411,7 +411,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
411
411
where
412
412
T : Default ,
413
413
{
414
- self . with ( |cell| cell . take ( ) )
414
+ self . with ( Cell :: take)
415
415
}
416
416
417
417
/// Replaces the contained value, returning the old value.
@@ -582,7 +582,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
582
582
where
583
583
T : Default ,
584
584
{
585
- self . with ( |cell| cell . take ( ) )
585
+ self . with ( RefCell :: take)
586
586
}
587
587
588
588
/// Replaces the contained value, returning the old value.
You can’t perform that action at this time.
0 commit comments