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 /video/dav1d
parent5ae1f721620e38acb6cf2569e2129b39b2282a7e (diff)
Update to Rust edition 2021 and minimum supported Rust version to 1.56
Diffstat (limited to 'video/dav1d')
-rw-r--r--video/dav1d/Cargo.toml3
-rw-r--r--video/dav1d/src/dav1ddec/imp.rs4
2 files changed, 3 insertions, 4 deletions
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
})