git.delta.rocks / jrsonnet / refs/commits / 6344af1d0323

difftreelog

style fix clippy warnings

Yaroslav Bolyukin2023-06-14parent: #3ea3f30.patch.diff
in: master

3 files changed

modifiedbindings/jsonnet/src/native.rsdiffbeforeafterboth
--- 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)
modifiedcrates/jrsonnet-evaluator/src/obj.rsdiffbeforeafterboth
--- 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(())
 		}
 	}
 }
modifiedcrates/jrsonnet-interner/src/lib.rsdiffbeforeafterboth
7979
80impl Drop for IStr {80impl Drop for IStr {
81 fn drop(&mut self) {81 fn drop(&mut self) {
82 maybe_unpool(&self.0)82 maybe_unpool(&self.0);
83 }83 }
84}84}
8585
151151
152impl Drop for IBytes {152impl Drop for IBytes {
153 fn drop(&mut self) {153 fn drop(&mut self) {
154 maybe_unpool(&self.0)154 maybe_unpool(&self.0);
155 }155 }
156}156}
157157
176 });176 });
177 }177 }
178 // First reference - current object, second - POOL178 // First reference - current object, second - POOL
179 if Inner::strong_count(&inner) <= 2 {179 if Inner::strong_count(inner) <= 2 {
180 unpool(&inner);180 unpool(inner);
181 }181 }
182}182}
183183