diff options
| author | ThinkChaos <ThinkChaos@users.noreply.github.com> | 2020-04-21 21:11:32 +0200 |
|---|---|---|
| committer | ThinkChaos <ThinkChaos@users.noreply.github.com> | 2020-04-26 11:50:53 +0200 |
| commit | 4ea83bfb3d457770f2e54965dd86f672fbbc87c2 (patch) | |
| tree | 7ee08d8b991be7406bb3cd706ea767b51d187643 /src/test/run-make | |
| parent | f121f094fe4d4f4e92142984e9230373c311e1e6 (diff) | |
| download | rust-4ea83bfb3d457770f2e54965dd86f672fbbc87c2.tar.gz rust-4ea83bfb3d457770f2e54965dd86f672fbbc87c2.zip | |
Use Cell::take in a couple places
Diffstat (limited to 'src/test/run-make')
| -rw-r--r-- | src/test/run-make/wasm-panic-small/foo.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/run-make/wasm-panic-small/foo.rs b/src/test/run-make/wasm-panic-small/foo.rs index fd3dddb18eb..6df52affe39 100644 --- a/src/test/run-make/wasm-panic-small/foo.rs +++ b/src/test/run-make/wasm-panic-small/foo.rs @@ -23,5 +23,5 @@ pub fn foo() { pub fn foo() -> usize { use std::cell::Cell; thread_local!(static A: Cell<Vec<u32>> = Cell::new(Vec::new())); - A.try_with(|x| x.replace(Vec::new()).len()).unwrap_or(0) + A.try_with(|x| x.take().len()).unwrap_or(0) } |
