git.delta.rocks / jrsonnet / refs/commits / af49e2463154

difftreelog

style reformat new code

Лач2020-06-28parent: #7aeaa5d.patch.diff
in: master

2 files changed

modifiedcmds/jrsonnet/src/main.rsdiffbeforeafterboth
1pub mod location;1pub mod location;
22
3use clap::Clap;3use clap::Clap;
4use jrsonnet_evaluator::{EvaluationSettings, EvaluationState, LocError, StackTrace, Val};4use jrsonnet_evaluator::{EvaluationState, LocError, StackTrace, Val};
5use jrsonnet_parser::{el, Arg, ArgsDesc, Expr, LocExpr, ParserSettings};5use jrsonnet_parser::{el, Arg, ArgsDesc, Expr, LocExpr, ParserSettings};
6use location::{offset_to_location, CodeLocation};6use location::{offset_to_location, CodeLocation};
7use std::env::current_dir;7use std::env::current_dir;
modifiedcrates/jrsonnet-evaluator/src/evaluate.rsdiffbeforeafterboth
--- a/crates/jrsonnet-evaluator/src/evaluate.rs
+++ b/crates/jrsonnet-evaluator/src/evaluate.rs
@@ -739,9 +739,9 @@
 						push(loc, "function call", body)?
 					}
 				}
-				v => create_error_result(crate::Error::OnlyFunctionsCanBeCalledGot(
-					v.value_type()?,
-				))?,
+				v => {
+					create_error_result(crate::Error::OnlyFunctionsCanBeCalledGot(v.value_type()?))?
+				}
 			}
 		}
 		Function(params, body) => evaluate_method(context, params.clone(), body.clone()),
@@ -795,8 +795,6 @@
 			import_location.pop();
 			Val::Str(with_state(|s| s.import_file_str(&import_location, path))?)
 		}
-		Literal(LiteralType::Super) => {
-			return create_error_result(crate::Error::StandaloneSuper)
-		}
+		Literal(LiteralType::Super) => return create_error_result(crate::Error::StandaloneSuper),
 	})
 }