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
28 use jrsonnet_gcmodule::Trace;28 use jrsonnet_gcmodule::Trace;
2929
30 #[derive(Clone, Copy, Default, Debug, Trace)]30 #[derive(Clone, Copy, Default, Debug, Trace)]
31 pub struct FieldIndex;31 pub struct FieldIndex(());
32 impl FieldIndex {32 impl FieldIndex {
33 pub const fn next(self) -> Self {33 pub const fn next(self) -> Self {
34 Self34 Self(())
35 }35 }
36 }36 }
3737
38 #[derive(Clone, Copy, Default, Debug, Trace)]38 #[derive(Clone, Copy, Default, Debug, Trace)]
39 pub struct SuperDepth;39 pub struct SuperDepth(());
40 impl SuperDepth {40 impl SuperDepth {
41 pub const fn deeper(self) -> Self {41 pub const fn deeper(self) -> Self {
42 Self42 Self(())
43 }43 }
44 }44 }
4545
46 #[derive(Clone, Copy)]46 #[derive(Clone, Copy)]
47 pub struct FieldSortKey;47 pub struct FieldSortKey(());
48 impl FieldSortKey {48 impl FieldSortKey {
49 pub const fn new(_: SuperDepth, _: FieldIndex) -> Self {49 pub const fn new(_: SuperDepth, _: FieldIndex) -> Self {
50 Self50 Self(())
51 }51 }
52 }52 }
53}53}
modifiedcrates/jrsonnet-interner/src/lib.rsdiffbeforeafterboth
--- 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);
 	}
 }