Skip to content

Commit

Permalink
style: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
CertainLach committed Aug 13, 2023
1 parent 773438d commit 6d08ea9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
5 changes: 1 addition & 4 deletions crates/jrsonnet-evaluator/src/function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ use self::{
native::NativeDesc,
parse::{parse_default_function_call, parse_function_call},
};
use crate::{
evaluate, evaluate_trivial, gc::TraceBox, tb, Context, ContextBuilder, Result,
Val,
};
use crate::{evaluate, evaluate_trivial, gc::TraceBox, tb, Context, ContextBuilder, Result, Val};

pub mod arglike;
pub mod builtin;
Expand Down
3 changes: 1 addition & 2 deletions crates/jrsonnet-evaluator/src/integrations/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ use serde::{
};

use crate::{
arr::ArrValue, runtime_error, Error as JrError, ObjValue, ObjValueBuilder,
Result, State, Val,
arr::ArrValue, runtime_error, Error as JrError, ObjValue, ObjValueBuilder, Result, State, Val,
};

impl<'de> Deserialize<'de> for Val {
Expand Down
12 changes: 5 additions & 7 deletions crates/jrsonnet-parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,13 +635,11 @@ pub mod tests {
el!(
Index {
indexable: el!(Var("std".into()), 1, 4),
parts: vec![
IndexPart {
value: el!(Str("deepJoin".into()), 5, 13),
#[cfg(feature = "exp-null-coaelse")]
null_coaelse: false,
},
],
parts: vec![IndexPart {
value: el!(Str("deepJoin".into()), 5, 13),
#[cfg(feature = "exp-null-coaelse")]
null_coaelse: false,
}],
},
1,
13
Expand Down
10 changes: 4 additions & 6 deletions crates/jrsonnet-stdlib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,10 @@ impl jrsonnet_evaluator::ContextInitializer for ContextInitializer {
std.with_super(self.stdlib_obj.clone());
std.field("thisFile".into())
.hide()
.value(Val::string(
match source.source_path().path() {
Some(p) => self.settings().path_resolver.resolve(p).into(),
None => source.source_path().to_string().into(),
},
))
.value(Val::string(match source.source_path().path() {
Some(p) => self.settings().path_resolver.resolve(p).into(),
None => source.source_path().to_string().into(),
}))
.expect("this object builder is empty");
let stdlib_with_this_file = std.build();

Expand Down

0 comments on commit 6d08ea9

Please sign in to comment.