chore: Replace as_any functions with trait upcasting (#28221)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use std::any::Any;
|
||||
use std::collections::BTreeSet;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
@@ -1288,11 +1289,8 @@ impl RemoteServerProjects {
|
||||
cx.notify();
|
||||
}));
|
||||
|
||||
let Some(scroll_handle) = scroll_state
|
||||
.scroll_handle()
|
||||
.as_any()
|
||||
.downcast_ref::<ScrollHandle>()
|
||||
else {
|
||||
let handle = &**scroll_state.scroll_handle() as &dyn Any;
|
||||
let Some(scroll_handle) = handle.downcast_ref::<ScrollHandle>() else {
|
||||
unreachable!()
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user