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
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-10-31 13:54:12 +0300
committerSebastian Dröge <sebastian@centricular.com>2021-10-31 18:40:05 +0300
commit0a7d1639e7b33d0bd941997bb88762c35473f0d4 (patch)
tree375d883100bc8e377c6551d1fb32625677923cc4
parent5ae1f721620e38acb6cf2569e2129b39b2282a7e (diff)
Update to Rust edition 2021 and minimum supported Rust version to 1.56
-rw-r--r--.gitlab-ci.yml6
-rw-r--r--audio/audiofx/Cargo.toml3
-rw-r--r--audio/claxon/Cargo.toml3
-rw-r--r--audio/csound/Cargo.toml3
-rw-r--r--audio/lewton/Cargo.toml3
-rwxr-xr-xci/install-rust-ext.sh3
-rw-r--r--generic/file/Cargo.toml3
-rw-r--r--generic/file/src/file_location.rs1
-rw-r--r--generic/sodium/Cargo.toml3
-rw-r--r--generic/sodium/src/decrypter/imp.rs2
-rw-r--r--generic/sodium/src/encrypter/imp.rs2
-rw-r--r--generic/threadshare/Cargo.toml3
-rw-r--r--generic/threadshare/src/appsrc/imp.rs1
-rw-r--r--generic/threadshare/src/udpsink/imp.rs2
-rw-r--r--net/reqwest/Cargo.toml3
-rw-r--r--net/reqwest/src/reqwesthttpsrc/imp.rs13
-rw-r--r--net/rusoto/Cargo.toml3
-rw-r--r--net/rusoto/src/s3sink/imp.rs5
-rw-r--r--net/rusoto/src/s3url.rs5
-rw-r--r--text/json/Cargo.toml3
-rw-r--r--text/json/src/jsongstparse/imp.rs1
-rw-r--r--text/regex/Cargo.toml3
-rw-r--r--text/wrap/Cargo.toml3
-rw-r--r--tutorial/Cargo.toml3
-rw-r--r--utils/fallbackswitch/Cargo.toml3
-rw-r--r--utils/fallbackswitch/src/fallbacksrc/imp.rs1
-rw-r--r--utils/togglerecord/Cargo.toml3
-rw-r--r--version-helper/Cargo.toml3
-rw-r--r--version-helper/src/lib.rs1
-rw-r--r--video/cdg/Cargo.toml3
-rw-r--r--video/cdg/src/cdgparse/imp.rs1
-rw-r--r--video/closedcaption/Cargo.toml3
-rw-r--r--video/closedcaption/src/mcc_parse/imp.rs1
-rw-r--r--video/closedcaption/src/scc_parse/imp.rs3
-rw-r--r--video/closedcaption/tests/scc_parse.rs5
-rw-r--r--video/dav1d/Cargo.toml3
-rw-r--r--video/dav1d/src/dav1ddec/imp.rs4
-rw-r--r--video/ffv1/Cargo.toml3
-rw-r--r--video/flavors/Cargo.toml3
-rw-r--r--video/gif/Cargo.toml3
-rw-r--r--video/gtk4/Cargo.toml3
-rw-r--r--video/gtk4/src/sink/frame.rs1
-rw-r--r--video/hsv/Cargo.toml3
-rw-r--r--video/hsv/src/hsvdetector/imp.rs1
-rw-r--r--video/hsv/src/hsvfilter/imp.rs1
-rw-r--r--video/rav1e/Cargo.toml3
-rw-r--r--video/rspng/Cargo.toml3
-rw-r--r--video/webp/Cargo.toml3
48 files changed, 69 insertions, 72 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 50c978129..58e66f3f6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -43,19 +43,19 @@ stages:
.debian:11-stable:
extends: .debian:11
variables:
- FDO_DISTRIBUTION_TAG: '$GST_RS_STABLE-${GST_RS_IMG_TAG}_2021-10-23.0'
+ FDO_DISTRIBUTION_TAG: '$GST_RS_STABLE-${GST_RS_IMG_TAG}_2021-10-31.0'
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bullseye-slim:$GST_RS_STABLE-$GST_RS_IMG_TAG"
.debian:11-msrv:
extends: .debian:11
variables:
- FDO_DISTRIBUTION_TAG: '$GST_RS_MSRV-${GST_RS_IMG_TAG}_2021-10-23.0'
+ FDO_DISTRIBUTION_TAG: '$GST_RS_MSRV-${GST_RS_IMG_TAG}_2021-10-31.0'
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bullseye-slim:$GST_RS_MSRV-$GST_RS_IMG_TAG"
.debian:11-nightly:
extends: .debian:11
variables:
- FDO_DISTRIBUTION_TAG: 'nightly-${GST_RS_IMG_TAG}_2021-10-23.0'
+ FDO_DISTRIBUTION_TAG: 'nightly-${GST_RS_IMG_TAG}_2021-10-31.0'
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bullseye-slim:nightly-$GST_RS_IMG_TAG"
.build-debian-container:
diff --git a/audio/audiofx/Cargo.toml b/audio/audiofx/Cargo.toml
index d86935602..6f6c93262 100644
--- a/audio/audiofx/Cargo.toml
+++ b/audio/audiofx/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "LGPL-2.1-or-later"
description = "Rust AudioFx Plugin"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"] }
diff --git a/audio/claxon/Cargo.toml b/audio/claxon/Cargo.toml
index 5597bc0a9..e96b6d85c 100644
--- a/audio/claxon/Cargo.toml
+++ b/audio/claxon/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Ruben Gonzalez <rgonzalez@fluendo.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
description = "Claxon FLAC Decoder Plugin"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
diff --git a/audio/csound/Cargo.toml b/audio/csound/Cargo.toml
index 6d2d9e6cc..7f61a02a9 100644
--- a/audio/csound/Cargo.toml
+++ b/audio/csound/Cargo.toml
@@ -4,7 +4,8 @@ version = "0.8.0"
authors = ["Natanael Mojica <neithanmo@gmail.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "LGPL-2.1-or-later"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "An Audio filter plugin based on Csound"
[dependencies]
diff --git a/audio/lewton/Cargo.toml b/audio/lewton/Cargo.toml
index d31b25f14..22d0f32e2 100644
--- a/audio/lewton/Cargo.toml
+++ b/audio/lewton/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
description = "lewton Vorbis Decoder Plugin"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
diff --git a/ci/install-rust-ext.sh b/ci/install-rust-ext.sh
index d3cd198ac..c92f06e31 100755
--- a/ci/install-rust-ext.sh
+++ b/ci/install-rust-ext.sh
@@ -3,5 +3,4 @@ source ./ci/env.sh
set -e
export CARGO_HOME='/usr/local/cargo'
-# Install 0.9.4 until Rust 1.56 is the minimum supported version here
-cargo install cargo-c --version 0.9.4+cargo-0.56
+cargo install cargo-c --version 0.9.5+cargo-0.57
diff --git a/generic/file/Cargo.toml b/generic/file/Cargo.toml
index c6371f9d6..72d2f8917 100644
--- a/generic/file/Cargo.toml
+++ b/generic/file/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
description = "Rust File Plugin"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
url = "2"
diff --git a/generic/file/src/file_location.rs b/generic/file/src/file_location.rs
index 8d567228b..5081c966f 100644
--- a/generic/file/src/file_location.rs
+++ b/generic/file/src/file_location.rs
@@ -1,7 +1,6 @@
use gst::glib;
use url::Url;
-use std::convert::AsRef;
use std::fmt;
use std::ops::Deref;
use std::path::{Path, PathBuf};
diff --git a/generic/sodium/Cargo.toml b/generic/sodium/Cargo.toml
index 2949ef753..ac424e548 100644
--- a/generic/sodium/Cargo.toml
+++ b/generic/sodium/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Jordan Petridis <jordan@centricular.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
description = "libsodium-based file encryption and decryption"
license = "MIT"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
gst = { package="gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
diff --git a/generic/sodium/src/decrypter/imp.rs b/generic/sodium/src/decrypter/imp.rs
index 286a87b1e..8c5d27541 100644
--- a/generic/sodium/src/decrypter/imp.rs
+++ b/generic/sodium/src/decrypter/imp.rs
@@ -306,8 +306,6 @@ impl Decrypter {
true
}
QueryView::Duration(ref mut q) => {
- use std::convert::TryInto;
-
if q.format() != gst::Format::Bytes {
return pad.query_default(Some(element), query);
}
diff --git a/generic/sodium/src/encrypter/imp.rs b/generic/sodium/src/encrypter/imp.rs
index e81e0c783..5ae2e1887 100644
--- a/generic/sodium/src/encrypter/imp.rs
+++ b/generic/sodium/src/encrypter/imp.rs
@@ -284,8 +284,6 @@ impl Encrypter {
true
}
QueryView::Duration(ref mut q) => {
- use std::convert::TryInto;
-
if q.format() != gst::Format::Bytes {
return pad.query_default(Some(element), query);
}
diff --git a/generic/threadshare/Cargo.toml b/generic/threadshare/Cargo.toml
index 24885eaf3..11906c78f 100644
--- a/generic/threadshare/Cargo.toml
+++ b/generic/threadshare/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Sebastian Dröge <sebastian@centricular.com>"]
license = "LGPL-2.1-or-later"
description = "Threadshare Plugin"
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
libc = "0.2"
diff --git a/generic/threadshare/src/appsrc/imp.rs b/generic/threadshare/src/appsrc/imp.rs
index 2c42a1bf3..3e62421d2 100644
--- a/generic/threadshare/src/appsrc/imp.rs
+++ b/generic/threadshare/src/appsrc/imp.rs
@@ -28,7 +28,6 @@ use gst::{gst_debug, gst_error, gst_log, gst_trace};
use once_cell::sync::Lazy;
-use std::convert::TryInto;
use std::sync::Arc;
use std::sync::Mutex as StdMutex;
use std::time::Duration;
diff --git a/generic/threadshare/src/udpsink/imp.rs b/generic/threadshare/src/udpsink/imp.rs
index edf911c7e..18f7e0851 100644
--- a/generic/threadshare/src/udpsink/imp.rs
+++ b/generic/threadshare/src/udpsink/imp.rs
@@ -34,10 +34,8 @@ use crate::runtime::prelude::*;
use crate::runtime::{self, Context, PadSink, PadSinkRef, Task};
use crate::socket::{wrap_socket, GioSocketWrapper};
-use std::convert::TryInto;
use std::mem;
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
-use std::string::ToString;
use std::sync::Mutex as StdMutex;
use std::sync::{Arc, RwLock};
use std::time::Duration;
diff --git a/net/reqwest/Cargo.toml b/net/reqwest/Cargo.toml
index b57cffecc..88bf38c41 100644
--- a/net/reqwest/Cargo.toml
+++ b/net/reqwest/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
description = "Rust HTTP Plugin"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
url = "2.1"
diff --git a/net/reqwest/src/reqwesthttpsrc/imp.rs b/net/reqwest/src/reqwesthttpsrc/imp.rs
index a65ae5a88..7025abbef 100644
--- a/net/reqwest/src/reqwesthttpsrc/imp.rs
+++ b/net/reqwest/src/reqwesthttpsrc/imp.rs
@@ -341,7 +341,6 @@ impl ReqwestHttpSrc {
) -> Result<State, Option<gst::ErrorMessage>> {
use headers::{Connection, ContentLength, ContentRange, HeaderMapExt, Range, UserAgent};
use reqwest::header::{self, HeaderMap, HeaderName, HeaderValue};
- use std::str::FromStr;
gst_debug!(CAT, obj: src, "Creating new request for {}", uri);
@@ -371,19 +370,17 @@ impl ReqwestHttpSrc {
}
}
- headers.typed_insert(UserAgent::from_str(&settings.user_agent).unwrap());
+ headers.typed_insert(settings.user_agent.parse::<UserAgent>().unwrap());
if !settings.compress {
// Compression is the default
headers.insert(
header::ACCEPT_ENCODING,
- HeaderValue::from_str("identity").unwrap(),
+ "identity".parse::<HeaderValue>().unwrap(),
);
};
if let Some(ref extra_headers) = settings.extra_headers {
- use std::convert::TryFrom;
-
for (field, value) in extra_headers.iter() {
let field = match HeaderName::try_from(field) {
Ok(field) => field,
@@ -416,7 +413,7 @@ impl ReqwestHttpSrc {
let value = value.get::<Option<&str>>().unwrap().unwrap_or("");
- let value = match HeaderValue::from_str(value) {
+ let value = match value.parse::<HeaderValue>() {
Ok(value) => value,
Err(_) => {
gst_warning!(
@@ -449,7 +446,7 @@ impl ReqwestHttpSrc {
if !settings.cookies.is_empty() {
headers.insert(
header::COOKIE,
- HeaderValue::from_str(&settings.cookies.join("; ")).unwrap(),
+ settings.cookies.join("; ").parse::<HeaderValue>().unwrap(),
);
}
@@ -562,7 +559,7 @@ impl ReqwestHttpSrc {
if let Some(content_type) = headers
.get(header::CONTENT_TYPE)
.and_then(|content_type| content_type.to_str().ok())
- .and_then(|content_type| mime::Mime::from_str(content_type).ok())
+ .and_then(|content_type| content_type.parse::<mime::Mime>().ok())
{
gst_debug!(CAT, obj: src, "Got content type {}", content_type);
if let Some(ref mut caps) = caps {
diff --git a/net/rusoto/Cargo.toml b/net/rusoto/Cargo.toml
index 67f9e736d..d44f83b5c 100644
--- a/net/rusoto/Cargo.toml
+++ b/net/rusoto/Cargo.toml
@@ -7,7 +7,8 @@ authors = ["Arun Raghavan <arun@arunraghavan.net>",
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
description = "Amazon Web Services plugin"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
bytes = "1.0"
diff --git a/net/rusoto/src/s3sink/imp.rs b/net/rusoto/src/s3sink/imp.rs
index 90b9f90f9..63c42569e 100644
--- a/net/rusoto/src/s3sink/imp.rs
+++ b/net/rusoto/src/s3sink/imp.rs
@@ -23,8 +23,6 @@ use rusoto_s3::{
use once_cell::sync::Lazy;
-use std::convert::From;
-use std::str::FromStr;
use std::sync::Mutex;
use crate::s3url::*;
@@ -521,7 +519,8 @@ impl ObjectImpl for S3Sink {
}
"region" => {
let region = value.get::<String>().expect("type checked upstream");
- settings.region = Region::from_str(&region)
+ settings.region = region
+ .parse::<Region>()
.or_else(|_| {
let (name, endpoint) = region.split_once('+').ok_or(())?;
Ok(Region::Custom {
diff --git a/net/rusoto/src/s3url.rs b/net/rusoto/src/s3url.rs
index b5e59ef61..f9d728d5a 100644
--- a/net/rusoto/src/s3url.rs
+++ b/net/rusoto/src/s3url.rs
@@ -6,8 +6,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use std::str::FromStr;
-
use percent_encoding::{percent_decode, percent_encode, AsciiSet, CONTROLS};
use rusoto_core::Region;
use url::Url;
@@ -75,7 +73,8 @@ pub fn parse_s3_url(url_str: &str) -> Result<GstS3Url, String> {
}
let host = url.host_str().unwrap();
- let region = Region::from_str(host)
+ let region = host
+ .parse::<Region>()
.or_else(|_| {
let (name, endpoint) = host.split_once('+').ok_or(())?;
let name =
diff --git a/text/json/Cargo.toml b/text/json/Cargo.toml
index 8107327b6..e57b9aaa5 100644
--- a/text/json/Cargo.toml
+++ b/text/json/Cargo.toml
@@ -3,7 +3,8 @@ name = "gst-plugin-json"
version = "0.8.0"
authors = ["Mathieu Duponchelle <mathieu@centricular.com>"]
license = "LGPL-2.1-or-later"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "Rust JSON Plugin"
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
diff --git a/text/json/src/jsongstparse/imp.rs b/text/json/src/jsongstparse/imp.rs
index 084deeda1..76cb16ddc 100644
--- a/text/json/src/jsongstparse/imp.rs
+++ b/text/json/src/jsongstparse/imp.rs
@@ -23,7 +23,6 @@ use gst::{gst_debug, gst_error, gst_info, gst_log, gst_trace, gst_warning};
use once_cell::sync::Lazy;
use std::cmp;
-use std::convert::TryInto;
use std::sync::{Mutex, MutexGuard};
use serde::Deserialize;
diff --git a/text/regex/Cargo.toml b/text/regex/Cargo.toml
index 8191646fd..2d5e753fa 100644
--- a/text/regex/Cargo.toml
+++ b/text/regex/Cargo.toml
@@ -3,7 +3,8 @@ name = "gst-plugin-regex"
version = "0.8.0"
authors = ["Mathieu Duponchelle <mathieu@centricular.com>"]
license = "LGPL-2.1-or-later"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "Rust Regular Expression Plugin"
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
diff --git a/text/wrap/Cargo.toml b/text/wrap/Cargo.toml
index 0b625443f..762568d2b 100644
--- a/text/wrap/Cargo.toml
+++ b/text/wrap/Cargo.toml
@@ -3,7 +3,8 @@ name = "gst-plugin-textwrap"
version = "0.8.0"
authors = ["Mathieu Duponchelle <mathieu@centricular.com>"]
license = "LGPL-2.1-or-later"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "Rust Text Wrap Plugin"
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
diff --git a/tutorial/Cargo.toml b/tutorial/Cargo.toml
index 9877730ca..0f00a68c7 100644
--- a/tutorial/Cargo.toml
+++ b/tutorial/Cargo.toml
@@ -4,7 +4,8 @@ version = "0.8.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "Rust Tutorial Plugin"
[dependencies]
diff --git a/utils/fallbackswitch/Cargo.toml b/utils/fallbackswitch/Cargo.toml
index 6f40aea84..f4b8bd7d3 100644
--- a/utils/fallbackswitch/Cargo.toml
+++ b/utils/fallbackswitch/Cargo.toml
@@ -4,7 +4,8 @@ version = "0.8.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "LGPL-2.1-or-later"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "Fallback Switcher Plugin"
[dependencies]
diff --git a/utils/fallbackswitch/src/fallbacksrc/imp.rs b/utils/fallbackswitch/src/fallbacksrc/imp.rs
index 14111b4c4..e43cc10bd 100644
--- a/utils/fallbackswitch/src/fallbacksrc/imp.rs
+++ b/utils/fallbackswitch/src/fallbacksrc/imp.rs
@@ -20,7 +20,6 @@ use gst::prelude::*;
use gst::subclass::prelude::*;
use gst::{gst_debug, gst_error, gst_info, gst_warning};
-use std::convert::TryFrom;
use std::mem;
use std::sync::Mutex;
use std::time::Instant;
diff --git a/utils/togglerecord/Cargo.toml b/utils/togglerecord/Cargo.toml
index caddfee09..43eac9822 100644
--- a/utils/togglerecord/Cargo.toml
+++ b/utils/togglerecord/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Sebastian Dröge <sebastian@centricular.com>"]
license = "LGPL-2.1-or-later"
description = "Toggle Record Plugin"
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
diff --git a/version-helper/Cargo.toml b/version-helper/Cargo.toml
index 88069022d..b8662b393 100644
--- a/version-helper/Cargo.toml
+++ b/version-helper/Cargo.toml
@@ -9,7 +9,8 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["gstreamer", "multimedia", "cargo"]
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
chrono = "0.4.6"
diff --git a/version-helper/src/lib.rs b/version-helper/src/lib.rs
index 753af786f..a9abe1bba 100644
--- a/version-helper/src/lib.rs
+++ b/version-helper/src/lib.rs
@@ -33,7 +33,6 @@
mod git;
use chrono::TimeZone;
-use std::convert::TryInto;
use std::time::SystemTime;
use std::{env, fs, path};
diff --git a/video/cdg/Cargo.toml b/video/cdg/Cargo.toml
index 887d8ec9c..b522c7fe5 100644
--- a/video/cdg/Cargo.toml
+++ b/video/cdg/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Guillaume Desmottes <guillaume.desmottes@collabora.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
description = "CDG Plugin"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_12"] }
diff --git a/video/cdg/src/cdgparse/imp.rs b/video/cdg/src/cdgparse/imp.rs
index 11cd3fc52..ab02f56a6 100644
--- a/video/cdg/src/cdgparse/imp.rs
+++ b/video/cdg/src/cdgparse/imp.rs
@@ -13,7 +13,6 @@ use gst::subclass::prelude::*;
use gst_base::prelude::*;
use gst_base::subclass::prelude::*;
use once_cell::sync::Lazy;
-use std::convert::TryInto;
use crate::constants::{
CDG_COMMAND, CDG_HEIGHT, CDG_MASK, CDG_PACKET_PERIOD, CDG_PACKET_SIZE, CDG_WIDTH,
diff --git a/video/closedcaption/Cargo.toml b/video/closedcaption/Cargo.toml
index a31fe8e9d..be60055b9 100644
--- a/video/closedcaption/Cargo.toml
+++ b/video/closedcaption/Cargo.toml
@@ -3,7 +3,8 @@ name = "gst-plugin-closedcaption"
version = "0.8.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>", "Jordan Petridis <jordan@centricular.com>", "Matthew Waters <matthew@centricular.com>"]
license = "LGPL-2.1-or-later"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "Rust Closed Caption Plugin"
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
diff --git a/video/closedcaption/src/mcc_parse/imp.rs b/video/closedcaption/src/mcc_parse/imp.rs
index 4edd08ab5..3dac9a9f3 100644
--- a/video/closedcaption/src/mcc_parse/imp.rs
+++ b/video/closedcaption/src/mcc_parse/imp.rs
@@ -25,7 +25,6 @@ use gst::{
use gst_video::ValidVideoTimeCode;
use std::cmp;
-use std::convert::TryInto;
use std::sync::{Mutex, MutexGuard};
use once_cell::sync::Lazy;
diff --git a/video/closedcaption/src/scc_parse/imp.rs b/video/closedcaption/src/scc_parse/imp.rs
index e3207d28e..09b7bbe14 100644
--- a/video/closedcaption/src/scc_parse/imp.rs
+++ b/video/closedcaption/src/scc_parse/imp.rs
@@ -25,7 +25,6 @@ use gst::{
};
use std::cmp;
-use std::convert::TryInto;
use std::sync::{Mutex, MutexGuard};
use once_cell::sync::Lazy;
@@ -106,8 +105,6 @@ fn parse_timecode(
framerate: gst::Fraction,
tc: &TimeCode,
) -> Result<gst_video::ValidVideoTimeCode, gst::FlowError> {
- use std::convert::TryFrom;
-
let mut tc = tc.clone();
// Workaround for various SCC files having invalid drop frame timecodes:
// Every full minute the first two timecodes are skipped, except for every tenth minute.
diff --git a/video/closedcaption/tests/scc_parse.rs b/video/closedcaption/tests/scc_parse.rs
index 404de9d40..3f729cb4a 100644
--- a/video/closedcaption/tests/scc_parse.rs
+++ b/video/closedcaption/tests/scc_parse.rs
@@ -113,9 +113,6 @@ fn test_parse() {
/// Test that ensures timecode parsing is the expected one
#[test]
fn test_timecodes() {
- use std::convert::TryInto;
- use std::str::FromStr;
-
init();
let data = include_bytes!("timecodes-cut-down-sample.scc").as_ref();
@@ -147,7 +144,7 @@ fn test_timecodes() {
let mut valid_timecodes: VecDeque<ValidVideoTimeCode> = timecodes
.iter()
.map(|s| {
- let mut t = VideoTimeCode::from_str(s).unwrap();
+ let mut t = s.parse::<VideoTimeCode>().unwrap();
t.set_fps(gst::Fraction::new(30000, 1001));
t.set_flags(gst_video::VideoTimeCodeFlags::DROP_FRAME);
t
diff --git a/video/dav1d/Cargo.toml b/video/dav1d/Cargo.toml
index 2af310761..de17ebc8c 100644
--- a/video/dav1d/Cargo.toml
+++ b/video/dav1d/Cargo.toml
@@ -2,7 +2,8 @@
name = "gst-plugin-dav1d"
version = "0.8.0"
authors = ["Philippe Normand <philn@igalia.com>"]
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
description = "Dav1d Plugin"
diff --git a/video/dav1d/src/dav1ddec/imp.rs b/video/dav1d/src/dav1ddec/imp.rs
index 4cfe4aa67..b73d168a2 100644
--- a/video/dav1d/src/dav1ddec/imp.rs
+++ b/video/dav1d/src/dav1ddec/imp.rs
@@ -15,9 +15,7 @@ use gst_video::subclass::prelude::*;
use once_cell::sync::Lazy;
-use std::convert::TryInto;
use std::i32;
-use std::str::FromStr;
use std::sync::Mutex;
#[derive(Default)]
@@ -80,7 +78,7 @@ impl Dav1dDec {
None => format_desc.into(),
}
};
- gst_video::VideoFormat::from_str(&f).unwrap_or_else(|_| {
+ f.parse::<gst_video::VideoFormat>().unwrap_or_else(|_| {
gst_warning!(CAT, "Unsupported dav1d format: {}", f);
gst_video::VideoFormat::Unknown
})
diff --git a/video/ffv1/Cargo.toml b/video/ffv1/Cargo.toml
index 8066d821e..4f8731bdd 100644
--- a/video/ffv1/Cargo.toml
+++ b/video/ffv1/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Arun Raghavan <arun@asymptotic.io>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
description = "FFV1 Decoder Plugin"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
byte-slice-cast = "1"
diff --git a/video/flavors/Cargo.toml b/video/flavors/Cargo.toml
index 39eb28c3e..2201d895e 100644
--- a/video/flavors/Cargo.toml
+++ b/video/flavors/Cargo.toml
@@ -4,7 +4,8 @@ version = "0.8.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "Rust FLV Plugin"
[dependencies]
diff --git a/video/gif/Cargo.toml b/video/gif/Cargo.toml
index 1daa86f48..233244c63 100644
--- a/video/gif/Cargo.toml
+++ b/video/gif/Cargo.toml
@@ -4,7 +4,8 @@ version = "0.8.0"
authors = ["Markus Ebner <info@ebner-markus.de>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "GStreamer GIF plugin"
[dependencies]
diff --git a/video/gtk4/Cargo.toml b/video/gtk4/Cargo.toml
index 9d1dbad3d..5c9a55023 100644
--- a/video/gtk4/Cargo.toml
+++ b/video/gtk4/Cargo.toml
@@ -4,7 +4,8 @@ version = "0.1.0"
authors = ["Bilal Elmoussaoui <bil.elmoussaoui@gmail.com>", "Jordan Petridis <jordan@centricular.com>", "Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MPL-2.0"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "GTK 4 Sink element and Paintable widget"
[dependencies]
diff --git a/video/gtk4/src/sink/frame.rs b/video/gtk4/src/sink/frame.rs
index 5fe11b188..1ea5a749e 100644
--- a/video/gtk4/src/sink/frame.rs
+++ b/video/gtk4/src/sink/frame.rs
@@ -12,7 +12,6 @@
use gtk::prelude::*;
use gtk::{gdk, glib};
use std::collections::{HashMap, HashSet};
-use std::convert::AsRef;
#[derive(Debug)]
pub struct Frame {
diff --git a/video/hsv/Cargo.toml b/video/hsv/Cargo.toml
index 4ba79dec6..7522cd784 100644
--- a/video/hsv/Cargo.toml
+++ b/video/hsv/Cargo.toml
@@ -4,7 +4,8 @@ version = "0.8.0"
authors = ["Julien Bardagi <julien.bardagi@gmail.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "HSV manipulation elements, written in Rust"
[dependencies]
diff --git a/video/hsv/src/hsvdetector/imp.rs b/video/hsv/src/hsvdetector/imp.rs
index e729d07d1..8a1f3a394 100644
--- a/video/hsv/src/hsvdetector/imp.rs
+++ b/video/hsv/src/hsvdetector/imp.rs
@@ -18,7 +18,6 @@ use std::i32;
use std::sync::Mutex;
use once_cell::sync::Lazy;
-use std::convert::TryInto;
use super::super::hsvutils;
diff --git a/video/hsv/src/hsvfilter/imp.rs b/video/hsv/src/hsvfilter/imp.rs
index 0cb8f457d..61071de8f 100644
--- a/video/hsv/src/hsvfilter/imp.rs
+++ b/video/hsv/src/hsvfilter/imp.rs
@@ -17,7 +17,6 @@ use std::i32;
use std::sync::Mutex;
use once_cell::sync::Lazy;
-use std::convert::TryInto;
use super::super::hsvutils;
diff --git a/video/rav1e/Cargo.toml b/video/rav1e/Cargo.toml
index f6cd71212..32d116135 100644
--- a/video/rav1e/Cargo.toml
+++ b/video/rav1e/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Sebastian Dröge <sebastian@centricular.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
description = "rav1e AV1 Encoder Plugin"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
diff --git a/video/rspng/Cargo.toml b/video/rspng/Cargo.toml
index dfbd01b8f..710fc109d 100644
--- a/video/rspng/Cargo.toml
+++ b/video/rspng/Cargo.toml
@@ -4,7 +4,8 @@ version = "0.8.0"
authors = ["Natanael Mojica <neithanmo@gmail.com>"]
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
license = "MIT/Apache-2.0"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "An PNG encoder/decoder written in pure Rust"
[dependencies]
diff --git a/video/webp/Cargo.toml b/video/webp/Cargo.toml
index 420719e12..f27aadb54 100644
--- a/video/webp/Cargo.toml
+++ b/video/webp/Cargo.toml
@@ -3,7 +3,8 @@ name = "gst-plugin-webp"
version = "0.8.0"
authors = ["Mathieu Duponchelle <mathieu@centricular.com>"]
license = "LGPL-2.1-or-later"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
description = "WebP Plugin"
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"