difftreelog
style update rustfmt
in: master
9 files changed
cmds/jrsonnet/src/main.rsdiffbeforeafterboth--- a/cmds/jrsonnet/src/main.rs
+++ b/cmds/jrsonnet/src/main.rs
@@ -208,7 +208,10 @@
create_dir_all(dir)?;
}
let Val::Obj(obj) = val else {
- throw!("value should be object for --multi manifest, got {}", val.value_type())
+ throw!(
+ "value should be object for --multi manifest, got {}",
+ val.value_type()
+ )
};
for (field, data) in obj.iter(
#[cfg(feature = "exp-preserve-order")]
crates/jrsonnet-evaluator/src/arr/spec.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/arr/spec.rs
+++ b/crates/jrsonnet-evaluator/src/arr/spec.rs
@@ -178,7 +178,9 @@
ArrayThunk::Waiting(..) => {}
};
- let ArrayThunk::Waiting(expr) = replace(&mut self.0.cached.borrow_mut()[index], ArrayThunk::Pending) else {
+ let ArrayThunk::Waiting(expr) =
+ replace(&mut self.0.cached.borrow_mut()[index], ArrayThunk::Pending)
+ else {
unreachable!()
};
@@ -489,7 +491,9 @@
ArrayThunk::Waiting(..) => {}
};
- let ArrayThunk::Waiting(_) = replace(&mut self.0.cached.borrow_mut()[index], ArrayThunk::Pending) else {
+ let ArrayThunk::Waiting(_) =
+ replace(&mut self.0.cached.borrow_mut()[index], ArrayThunk::Pending)
+ else {
unreachable!()
};
crates/jrsonnet-evaluator/src/manifest.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/manifest.rs
+++ b/crates/jrsonnet-evaluator/src/manifest.rs
@@ -276,7 +276,10 @@
impl ManifestFormat for StringFormat {
fn manifest_buf(&self, val: Val, out: &mut String) -> Result<()> {
let Val::Str(s) = val else {
- throw!("output should be string for string manifest format, got {}", val.value_type())
+ throw!(
+ "output should be string for string manifest format, got {}",
+ val.value_type()
+ )
};
write!(out, "{s}").unwrap();
Ok(())
@@ -290,7 +293,10 @@
impl<I: ManifestFormat> ManifestFormat for YamlStreamFormat<I> {
fn manifest_buf(&self, val: Val, out: &mut String) -> Result<()> {
let Val::Arr(arr) = val else {
- throw!("output should be array for yaml stream format, got {}", val.value_type())
+ throw!(
+ "output should be array for yaml stream format, got {}",
+ val.value_type()
+ )
};
if !arr.is_empty() {
for v in arr.iter() {
crates/jrsonnet-evaluator/src/val.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/val.rs
+++ b/crates/jrsonnet-evaluator/src/val.rs
@@ -72,7 +72,8 @@
ThunkInner::Pending => return Err(InfiniteRecursionDetected.into()),
ThunkInner::Waiting(..) => (),
};
- let ThunkInner::Waiting(value) = replace(&mut *self.0.borrow_mut(), ThunkInner::Pending) else {
+ let ThunkInner::Waiting(value) = replace(&mut *self.0.borrow_mut(), ThunkInner::Pending)
+ else {
unreachable!();
};
let new_value = match value.0.get() {
crates/jrsonnet-macros/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-macros/src/lib.rs
+++ b/crates/jrsonnet-macros/src/lib.rs
@@ -51,7 +51,7 @@
fn extract_type_from_option(ty: &Type) -> Result<Option<&Type>> {
let Some(args) = type_is_path(ty, "Option") else {
- return Ok(None)
+ return Ok(None);
};
// It should have only on angle-bracketed param ("<String>"):
let PathArguments::AngleBracketed(params) = args else {
@@ -63,7 +63,7 @@
return Err(Error::new(
generic_arg.span(),
"option generic should be a type",
- ))
+ ));
};
Ok(Some(ty))
}
@@ -210,7 +210,7 @@
return Err(Error::new(
fun.sig.span(),
"builtin should return something",
- ))
+ ));
};
let name = fun.sig.ident.to_string();
crates/jrsonnet-parser/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-parser/src/lib.rs
+++ b/crates/jrsonnet-parser/src/lib.rs
@@ -630,7 +630,7 @@
el!(
Apply(
el!(
- Index{
+ Index {
indexable: el!(Var("std".into()), 1, 4),
index: el!(Str("deepJoin".into()), 5, 13),
#[cfg(feature = "exp-null-coaelse")]
crates/jrsonnet-parser/src/source.rsdiffbeforeafterboth--- a/crates/jrsonnet-parser/src/source.rs
+++ b/crates/jrsonnet-parser/src/source.rs
@@ -33,7 +33,7 @@
}
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>()
flake.lockdiffbeforeafterboth5 packageslockfile v7
Might be heavy and slow!
default
da67096github.com/nix-systems/default↘ 0↖ 1sourcegithub:nix-systems/defaultchecksumsha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=used byflake-utils
919d646github.com/numtide/flake-utils↘ 1↖ 2sourcegithub:numtide/flake-utilschecksumsha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=depends onused bynixpkgs
1941c7dgithub.com/nixos/nixpkgs↘ 0↖ 2sourcegithub:nixos/nixpkgschecksumsha256-kdW79sfwX2TTX8yFBNUsEYOG+gQuAOHU+WcUtxMUnlc=used byroot
workspace↘ 3↖ 0rust-overlay
db8d909github.com/oxalica/rust-overlay↘ 2↖ 1sourcegithub:oxalica/rust-overlaychecksumsha256-/z/Al4sFcIh5oPQWA9MclQmJR9g3RO8UDiHGaj/T9R8=depends onused by
flake.nixdiffbeforeafterboth--- a/flake.nix
+++ b/flake.nix
@@ -16,7 +16,7 @@
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
- rust = ((pkgs.rustChannelOf { date = "2023-06-26"; channel = "nightly"; }).default.override {
+ rust = ((pkgs.rustChannelOf { date = "2023-07-23"; channel = "nightly"; }).default.override {
extensions = [ "rust-src" "miri" "rust-analyzer" ];
});
in