Skip to content

Commit

Permalink
workaround for compatibility lint issue. see:
Browse files Browse the repository at this point in the history
  • Loading branch information
fu5ha committed Dec 7, 2018
1 parent d863d61 commit df8429d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion factory/src/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ macro_rules! init_factory_for_backend {
_B::$backend => {
if std::any::TypeId::of::<$backend::Backend>() == std::any::TypeId::of::<$target>() {
let instance = $backend::Instance::create("Rendy", 1);
let factory: Box<dyn std::any::Any> = Box::new(Factory::init(instance, $config)?);
let factory: Box<std::any::Any> = Box::new(Factory::init(instance, $config)?);
return Ok(*factory.downcast::<Factory<$target>>().unwrap());
}
})+
Expand Down
2 changes: 1 addition & 1 deletion wsi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ macro_rules! create_surface_for_backend {
#[$feature]
_B::$backend => {
if let Some(instance) = std::any::Any::downcast_ref(&**$instance) {
let surface: Box<dyn std::any::Any> = Box::new(self::$backend::create_surface(instance, $window));
let surface: Box<std::any::Any> = Box::new(self::$backend::create_surface(instance, $window));
return *surface.downcast().expect(concat!("`", stringify!($backend), "::Backend::Surface` must be `", stringify!($backend), "::Surface`"));
}
})+
Expand Down

0 comments on commit df8429d

Please sign in to comment.