Skip to content

Commit

Permalink
Remove alloc flag set at cached get_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
elftausend committed Nov 24, 2024
1 parent 477744d commit e13acba
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/modules/cached.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,13 @@ where
S: Shape,
{
let entry = self.cache.get_mut(id, len)?;
let mut entry = RefMut::map(entry, |x| {
let entry = RefMut::map(entry, |x| {
if x.is::<Mods::Wrap<'static, T, D::Base<T, S>>>() {
unsafe { Downcast::downcast_mut_unchecked::<Mods::Wrap<'a, T, D::Base<T, S>>>(x) }
} else {
panic!()
}
// x.downcast_mut::<Mods::Wrap<'static, T, D::Base<T, S>>>()
// .unwrap()
});
unsafe { entry.set_flag(crate::flag::AllocFlag::None) };
Ok(Guard::new(CowMut::BorrowedMut(entry)))
}
}
Expand Down

0 comments on commit e13acba

Please sign in to comment.