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/video
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2023-03-09 18:38:03 +0300
committerGuillaume Desmottes <guillaume.desmottes@onestream.live>2023-03-10 18:48:32 +0300
commit8eaa0c6ed132f275ba8a94d81243906268ca81ff (patch)
treec80fc81c5dc76cd84391fb83ca03031840f34af0 /video
parentadfa99946eecd2d77d79d9f96789ec69bb8a2cd6 (diff)
Fix indentation broken by `cargo clippy --fix`
... and another clippy warning. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1129>
Diffstat (limited to 'video')
-rw-r--r--video/closedcaption/src/mcc_parse/parser.rs2
-rw-r--r--video/closedcaption/src/scc_parse/parser.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/video/closedcaption/src/mcc_parse/parser.rs b/video/closedcaption/src/mcc_parse/parser.rs
index 6c847b21..93acefd8 100644
--- a/video/closedcaption/src/mcc_parse/parser.rs
+++ b/video/closedcaption/src/mcc_parse/parser.rs
@@ -229,7 +229,7 @@ fn mcc_payload_item(s: &[u8]) -> IResult<&[u8], Either<u8, &'static [u8]>> {
map(tag("Z"), |_| Either::Right([0x00].as_ref())),
map(take_while_m_n(2, 2, is_hex_digit), |s: &[u8]| {
let hex_to_u8 = |v: u8| match v {
- v if (b'0'..=b'9').contains(&v) => v - b'0',
+ v if v.is_ascii_digit() => v - b'0',
v if (b'A'..=b'F').contains(&v) => 10 + v - b'A',
v if (b'a'..=b'f').contains(&v) => 10 + v - b'a',
_ => unreachable!(),
diff --git a/video/closedcaption/src/scc_parse/parser.rs b/video/closedcaption/src/scc_parse/parser.rs
index 8f299847..cc0acba9 100644
--- a/video/closedcaption/src/scc_parse/parser.rs
+++ b/video/closedcaption/src/scc_parse/parser.rs
@@ -69,7 +69,7 @@ fn scc_payload_item(s: &[u8]) -> IResult<&[u8], (u8, u8)> {
"invalid SCC payload item",
map(take_while_m_n(4, 4, is_hex_digit), |s: &[u8]| {
let hex_to_u8 = |v: u8| match v {
- v if (b'0'..=b'9').contains(&v) => v - b'0',
+ v if v.is_ascii_digit() => v - b'0',
v if (b'A'..=b'F').contains(&v) => 10 + v - b'A',
v if (b'a'..=b'f').contains(&v) => 10 + v - b'a',
_ => unreachable!(),