We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 943ea33 commit 37ee9b9Copy full SHA for 37ee9b9
src/buffer/any_buffer.rs
@@ -861,6 +861,17 @@ impl<T: 'static + Send + Sync> AnyBufferAccessImpl<T> {
861
})),
862
);
863
864
+ // Allow downcasting back to the original Buffer<T>
865
+ buffer_downcasts.insert(
866
+ TypeId::of::<Buffer<T>>(),
867
+ Box::leak(Box::new(|location| -> Box<dyn Any> {
868
+ Box::new(Buffer::<T> {
869
+ location,
870
+ _ignore: Default::default(),
871
+ })
872
+ })),
873
+ );
874
+
875
let mut key_downcasts: HashMap<_, KeyDowncastRef> = HashMap::new();
876
877
// Automatically register a downcast to AnyBufferKey
0 commit comments