diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-01-12 20:51:08 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2022-01-12 20:51:08 +0300 |
commit | 81f5f0f60cf9f30c151add697da52a84b689fe12 (patch) | |
tree | 62dc6b093d8545974c1ef03cfc8b99ac4a46d4c3 /text/json | |
parent | 0bc76976000ed745ffe00cac0311131e48835f8c (diff) |
Fix various clippy warnings
Diffstat (limited to 'text/json')
-rw-r--r-- | text/json/src/jsongstparse/imp.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/text/json/src/jsongstparse/imp.rs b/text/json/src/jsongstparse/imp.rs index 76cb16dd..86bdb255 100644 --- a/text/json/src/jsongstparse/imp.rs +++ b/text/json/src/jsongstparse/imp.rs @@ -220,8 +220,7 @@ impl JsonGstParse { ) -> Result<gst::FlowSuccess, gst::FlowError> { let mut state = self.state.lock().unwrap(); - let drain; - if let Some(buffer) = buffer { + let drain = if let Some(buffer) = buffer { let buffer = buffer.into_mapped_buffer_readable().map_err(|_| { gst::element_error!( element, @@ -233,10 +232,10 @@ impl JsonGstParse { })?; state.reader.push(buffer); - drain = false; + false } else { - drain = true; - } + true + }; loop { let seeking = state.seeking; |