From b5c7d27f966556aae5a8fe4b687b894466ab9ba3 Mon Sep 17 00:00:00 2001 From: lummax Date: Wed, 2 Sep 2015 12:43:52 +0200 Subject: [PATCH] frame/video: implement `From` --- src/util/frame/video.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/frame/video.rs b/src/util/frame/video.rs index 2ca9fb9..28d9857 100644 --- a/src/util/frame/video.rs +++ b/src/util/frame/video.rs @@ -319,6 +319,12 @@ impl Clone for Video { } } +impl From for Video { + fn from(frame: Frame) -> Self { + Video(frame) + } +} + pub unsafe trait Component { fn is_valid(format: format::Pixel) -> bool; }