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

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/text/json
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-07-30 13:53:35 +0300
committerSebastian Dröge <sebastian@centricular.com>2021-07-30 13:53:35 +0300
commit052365ba1ade85dd10490cb156741226c66e6de5 (patch)
tree659856f3715b41ad27f6769db02c248065dde392 /text/json
parent67f566dd287bf19c3e51a2f893dec5b70c27b6a1 (diff)
Fix various needless-borrow clippy warnings and others
Diffstat (limited to 'text/json')
-rw-r--r--text/json/src/jsongstparse/imp.rs6
-rw-r--r--text/json/tests/json.rs4
2 files changed, 5 insertions, 5 deletions
diff --git a/text/json/src/jsongstparse/imp.rs b/text/json/src/jsongstparse/imp.rs
index b722602a..78289922 100644
--- a/text/json/src/jsongstparse/imp.rs
+++ b/text/json/src/jsongstparse/imp.rs
@@ -130,7 +130,7 @@ impl State {
}
};
- let line: Line = serde_json::from_slice(&line).map_err(|err| (line, err))?;
+ let line: Line = serde_json::from_slice(line).map_err(|err| (line, err))?;
Ok(Some(line))
}
@@ -181,7 +181,7 @@ impl State {
self.need_segment = false;
}
- events.extend(self.pending_events.drain(..));
+ events.append(&mut self.pending_events);
events
}
@@ -501,7 +501,7 @@ impl JsonGstParse {
pts,
duration,
data: _data,
- }) = serde_json::from_slice(&line)
+ }) = serde_json::from_slice(line)
{
last_pts = pts.zip(duration).map(|(pts, duration)| pts + duration);
}
diff --git a/text/json/tests/json.rs b/text/json/tests/json.rs
index 80df4c2d..bbe35fb5 100644
--- a/text/json/tests/json.rs
+++ b/text/json/tests/json.rs
@@ -88,8 +88,8 @@ fn test_parse() {
match ev.view() {
EventView::Caps(ev) => {
assert!(ev.caps().is_strictly_equal(&gst::Caps::new_simple(
- &"application/x-json",
- &[(&"format", &"test")]
+ "application/x-json",
+ &[("format", &"test")]
)));
}
_ => (),