Use RefCell::take

This commit is contained in:
Lukas Wirth 2024-04-30 14:19:56 +02:00 committed by GitHub
parent 14ef6363df
commit b1ed49208e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,6 +65,6 @@ pub fn update_impl_traits_bounds(&self, bounds: Vec<Interned<TypeBound>>) {
}
pub fn take_impl_traits_bounds(&self) -> Vec<Vec<Interned<TypeBound>>> {
self.impl_trait_bounds.borrow_mut().drain(..).collect()
self.impl_trait_bounds.take()
}
}