Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/text/wrap
diff options
context:
space:
mode:
authorFrançois Laignel <fengalin@free.fr>2021-06-05 01:16:05 +0300
committerFrançois Laignel <fengalin@free.fr>2021-06-05 11:36:22 +0300
commit5439f14e57ad865e8e19b45ac191ed98743d8e2b (patch)
treebe5b86826bb55e6d25121c3ad65560f216844f6c /text/wrap
parent8f8f5bdff70da01e8c518fca3a7a4a5b72a97c68 (diff)
fix clippy warnings
Diffstat (limited to 'text/wrap')
-rw-r--r--text/wrap/src/gsttextwrap/imp.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/text/wrap/src/gsttextwrap/imp.rs b/text/wrap/src/gsttextwrap/imp.rs
index d2e0bd419..960ca2ebf 100644
--- a/text/wrap/src/gsttextwrap/imp.rs
+++ b/text/wrap/src/gsttextwrap/imp.rs
@@ -181,9 +181,8 @@ impl TextWrap {
start_ts + accumulate_time < pts
})
{
- let mut buf = gst::Buffer::from_mut_slice(
- mem::replace(&mut state.current_text, String::new()).into_bytes(),
- );
+ let mut buf =
+ gst::Buffer::from_mut_slice(mem::take(&mut state.current_text).into_bytes());
{
let buf_mut = buf.get_mut().unwrap();
buf_mut.set_pts(state.start_ts);
@@ -366,7 +365,7 @@ impl TextWrap {
let mut state = self.state.lock().unwrap();
if !state.current_text.is_empty() {
let mut buf = gst::Buffer::from_mut_slice(
- mem::replace(&mut state.current_text, String::new()).into_bytes(),
+ mem::take(&mut state.current_text).into_bytes(),
);
{
let buf_mut = buf.get_mut().unwrap();