mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Remove compatibility code before 1.64 (#3379)
This commit is contained in:
parent
42e1890f03
commit
b28e69a574
@ -452,25 +452,9 @@ mod feat_csr_ssr {
|
||||
}
|
||||
}
|
||||
|
||||
#[rustversion::before(1.63)]
|
||||
#[inline]
|
||||
pub(super) fn arch_get_component(&self) -> Option<impl Deref<Target = COMP> + '_> {
|
||||
self.state.try_borrow().ok().and_then(|state_ref| {
|
||||
state_ref.as_ref()?;
|
||||
Some(Ref::map(state_ref, |state| {
|
||||
state
|
||||
.as_ref()
|
||||
.and_then(|m| m.downcast_comp_ref::<COMP>())
|
||||
.unwrap()
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
#[rustversion::since(1.63)]
|
||||
#[inline]
|
||||
pub(super) fn arch_get_component(&self) -> Option<impl Deref<Target = COMP> + '_> {
|
||||
self.state.try_borrow().ok().and_then(|state_ref| {
|
||||
// Ref::filter_map is only available since 1.63
|
||||
Ref::filter_map(state_ref, |state| {
|
||||
state.as_ref().and_then(|m| m.downcast_comp_ref::<COMP>())
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user