Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
0123456789-jpg committed Oct 26, 2023
1 parent 9e53518 commit fcb3f95
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/text/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use rimecraft_primitives::ErasedSerDeUpdate;
///TODO: Implement net.minecraft.text.Text
pub trait Text {
fn style(&self) -> &Style;
fn siblings(&self) -> Vec<Box<dyn Text>>;
}

///The style of a [`Text`].\
Expand Down Expand Up @@ -244,7 +245,9 @@ impl HoverEvent {
#[inline]
pub fn value<T: 'static>(&self) -> Option<&T> {
if TypeId::of::<T>() == self.contents.1 {
Some(unsafe { &*(&*self.contents.0 as *const (dyn UpdDebug + Send + Sync) as *const T) })
Some(unsafe {
&*(&*self.contents.0 as *const (dyn UpdDebug + Send + Sync) as *const T)
})
} else {
None
}
Expand Down

0 comments on commit fcb3f95

Please sign in to comment.