diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-04 01:38:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-04 01:38:46 +0200 |
| commit | 88c007cd0418e92bbacb8a46d9f9b23422da0d56 (patch) | |
| tree | f0b6b549f2d818d2e12a6b38eebe6c74e026d536 /src/libproc_macro/bridge/buffer.rs | |
| parent | 6cfd474e3337934da9606844e6cf571f96d9652b (diff) | |
| parent | eddfad31400b9c6cba6eda95cadd96c455504898 (diff) | |
Rollup merge of #62249 - czipperz:use-mem-take-instead-of-replace-default, r=dtolnay,Centril
Use mem::take instead of mem::replace with default
Diffstat (limited to 'src/libproc_macro/bridge/buffer.rs')
| -rw-r--r-- | src/libproc_macro/bridge/buffer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libproc_macro/bridge/buffer.rs b/src/libproc_macro/bridge/buffer.rs index 0d8cc552d61..a51e3a9a33d 100644 --- a/src/libproc_macro/bridge/buffer.rs +++ b/src/libproc_macro/bridge/buffer.rs @@ -78,7 +78,7 @@ impl<T: Copy> Buffer<T> { } pub(super) fn take(&mut self) -> Self { - mem::replace(self, Self::default()) + mem::take(self) } pub(super) fn extend_from_slice(&mut self, xs: &[T]) { |
