all: use trait upcasting
This commit is contained in:
parent
f0caafc862
commit
09e5f89174
44 changed files with 90 additions and 269 deletions
|
|
@ -6,7 +6,7 @@ use {
|
|||
},
|
||||
video::drm::ConnectorType,
|
||||
},
|
||||
std::{any::Any, error::Error, rc::Rc},
|
||||
std::{error::Error, rc::Rc},
|
||||
};
|
||||
|
||||
pub struct DummyBackend;
|
||||
|
|
@ -15,10 +15,6 @@ impl Backend for DummyBackend {
|
|||
fn run(self: Rc<Self>) -> SpawnedFuture<Result<(), Box<dyn Error>>> {
|
||||
unreachable!();
|
||||
}
|
||||
|
||||
fn into_any(self: Rc<Self>) -> Rc<dyn Any> {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
pub struct DummyOutput {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ use {
|
|||
},
|
||||
bstr::ByteSlice,
|
||||
std::{
|
||||
any::Any,
|
||||
cell::{Cell, RefCell},
|
||||
error::Error,
|
||||
ffi::{CStr, CString},
|
||||
|
|
@ -233,10 +232,6 @@ impl Backend for MetalBackend {
|
|||
}
|
||||
}
|
||||
|
||||
fn into_any(self: Rc<Self>) -> Rc<dyn Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn switch_to(&self, vtnr: u32) {
|
||||
self.session.switch_to(vtnr, move |res| {
|
||||
if let Err(e) = res {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ use {
|
|||
},
|
||||
jay_config::video::GfxApi,
|
||||
std::{
|
||||
any::Any,
|
||||
borrow::Cow,
|
||||
cell::{Cell, RefCell},
|
||||
collections::VecDeque,
|
||||
|
|
@ -251,10 +250,6 @@ impl Backend for XBackend {
|
|||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
fn into_any(self: Rc<Self>) -> Rc<dyn Any> {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
pub struct XBackend {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue