difftreelog
style fix clippy warnings
in: master
3 files changed
bindings/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)
crates/jrsonnet-evaluator/src/obj.rsdiffbeforeafterboth28 use jrsonnet_gcmodule::Trace;28 use jrsonnet_gcmodule::Trace;292930 #[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 }373738 #[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 }454546 #[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}crates/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);
}
}