--- a/bindings/jsonnet/src/native.rs +++ b/bindings/jsonnet/src/native.rs @@ -43,13 +43,7 @@ } n_args.push(None); let mut success = 1; - let v = unsafe { - (self.cb)( - self.ctx, - n_args.as_ptr().cast(), - &mut success, - ) - }; + let v = unsafe { (self.cb)(self.ctx, n_args.as_ptr().cast(), &mut success) }; let v = unsafe { *Box::from_raw(v) }; if success == 1 { Ok(v) --- a/crates/jrsonnet-evaluator/src/obj.rs +++ b/crates/jrsonnet-evaluator/src/obj.rs @@ -28,26 +28,26 @@ use jrsonnet_gcmodule::Trace; #[derive(Clone, Copy, Default, Debug, Trace)] - pub struct FieldIndex; + pub struct FieldIndex(()); impl FieldIndex { pub const fn next(self) -> Self { - Self + Self(()) } } #[derive(Clone, Copy, Default, Debug, Trace)] - pub struct SuperDepth; + pub struct SuperDepth(()); impl SuperDepth { pub const fn deeper(self) -> Self { - Self + Self(()) } } #[derive(Clone, Copy)] - pub struct FieldSortKey; + pub struct FieldSortKey(()); impl FieldSortKey { pub const fn new(_: SuperDepth, _: FieldIndex) -> Self { - Self + Self(()) } } } --- a/crates/jrsonnet-interner/src/lib.rs +++ b/crates/jrsonnet-interner/src/lib.rs @@ -79,7 +79,7 @@ impl Drop for IStr { fn drop(&mut self) { - maybe_unpool(&self.0) + maybe_unpool(&self.0); } } @@ -151,7 +151,7 @@ impl Drop for IBytes { fn drop(&mut self) { - maybe_unpool(&self.0) + maybe_unpool(&self.0); } } @@ -176,8 +176,8 @@ }); } // First reference - current object, second - POOL - if Inner::strong_count(&inner) <= 2 { - unpool(&inner); + if Inner::strong_count(inner) <= 2 { + unpool(inner); } }