git.delta.rocks / jrsonnet / refs/commits / 7dd6efcc0784

difftreelog

fix pointer width guard for size assertion

Yaroslav Bolyukin2022-12-12parent: #79f938e.patch.diff
in: master

2 files changed

modifiedcrates/jrsonnet-evaluator/src/val.rsdiffbeforeafterboth
301 Func(FuncVal),301 Func(FuncVal),
302}302}
303303
304#[cfg(target_pointer_width = "64")]
304static_assertions::assert_eq_size!(Val, [u8; 24]);305static_assertions::assert_eq_size!(Val, [u8; 24]);
305306
306impl From<IndexableVal> for Val {307impl From<IndexableVal> for Val {
modifiedcrates/jrsonnet-parser/src/source.rsdiffbeforeafterboth
--- a/crates/jrsonnet-parser/src/source.rs
+++ b/crates/jrsonnet-parser/src/source.rs
@@ -33,8 +33,8 @@
 		}
 		fn dyn_eq(&self, other: &dyn $T) -> bool {
 			let Some(other) = other.as_any().downcast_ref::<Self>() else {
-						return false
-					};
+												return false
+											};
 			let this = <Self as $T>::as_any(self)
 				.downcast_ref::<Self>()
 				.expect("restricted by impl");
@@ -260,7 +260,6 @@
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[derive(Clone, PartialEq, Eq, Debug)]
 pub struct Source(pub Rc<(SourcePath, IStr)>);
-static_assertions::assert_eq_size!(Source, *const ());
 
 impl Trace for Source {
 	fn trace(&self, _tracer: &mut Tracer) {}