Skip to content

Commit

Permalink
Remove compatibility code before 1.64.
Browse files Browse the repository at this point in the history
  • Loading branch information
futursolo committed Aug 19, 2023
1 parent 42e1890 commit 1e2b843
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions packages/yew/src/html/component/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>())
})
Expand Down

0 comments on commit 1e2b843

Please sign in to comment.