diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2021-03-25 20:44:56 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2021-03-25 20:44:56 +0300 |
commit | f8adb42f7b503c755200dba4c6f8530b3cabf4f4 (patch) | |
tree | ae29d9ee2a1466d684f8e5f94ef318fe78e57953 /text | |
parent | 9d359d934110239dc84a6dd0cef2a2b929a93079 (diff) |
json: Don't needlessly create a full-range subslice of a slice
Diffstat (limited to 'text')
-rw-r--r-- | text/json/tests/json.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/text/json/tests/json.rs b/text/json/tests/json.rs index ad7d7410a..778980094 100644 --- a/text/json/tests/json.rs +++ b/text/json/tests/json.rs @@ -38,7 +38,7 @@ fn test_enc() { h.set_src_caps_str("application/x-json, format=test"); let buf = { - let mut buf = gst::Buffer::from_mut_slice(Vec::from(&input[..])); + let mut buf = gst::Buffer::from_mut_slice(Vec::from(input)); let buf_ref = buf.get_mut().unwrap(); buf_ref.set_pts(gst::ClockTime::from_seconds(0)); buf_ref.set_duration(gst::ClockTime::from_seconds(2)); |