git.delta.rocks / jrsonnet / refs/commits / 0ba2642a3a69

difftreelog

style(evaluator) fix clippy warnings

Лач2020-06-27parent: #0afc5f7.patch.diff
in: master

3 files changed

modifiedcrates/jsonnet-evaluator/src/evaluate.rsdiffbeforeafterboth
5};5};
6use closure::closure;6use closure::closure;
7use jsonnet_parser::{7use jsonnet_parser::{
8 el, Arg, ArgsDesc, AssertStmt, BinaryOpType, BindSpec, CompSpec, Expr, FieldMember,8 AssertStmt, BinaryOpType, BindSpec, CompSpec, Expr, FieldMember, ForSpecData, IfSpecData,
9 ForSpecData, IfSpecData, LiteralType, LocExpr, Member, ObjBody, ParamsDesc, UnaryOpType,9 LiteralType, LocExpr, Member, ObjBody, ParamsDesc, UnaryOpType, Visibility,
10 Visibility,
11};10};
203 })202 })
204}203}
205204
206pub fn evaluate_member_list_object(context: Context, members: &Vec<Member>) -> Result<ObjValue> {205pub fn evaluate_member_list_object(context: Context, members: &[Member]) -> Result<ObjValue> {
207 let new_bindings = FutureNewBindings::new();206 let new_bindings = FutureNewBindings::new();
208 let future_this = FutureObjValue::new();207 let future_this = FutureObjValue::new();
209 let context_creator = context_creator!(208 let context_creator = context_creator!(
modifiedcrates/jsonnet-evaluator/src/import.rsdiffbeforeafterboth
62 }62 }
63}63}
6464
65type ResolutionData = (PathBuf, PathBuf);
65pub struct CachingImportResolver {66pub struct CachingImportResolver {
66 resolution_cache: RefCell<HashMap<(PathBuf, PathBuf), Result<Rc<PathBuf>>>>,67 resolution_cache: RefCell<HashMap<ResolutionData, Result<Rc<PathBuf>>>>,
67 loading_cache: RefCell<HashMap<PathBuf, Result<Rc<str>>>>,68 loading_cache: RefCell<HashMap<PathBuf, Result<Rc<str>>>>,
68 inner: Box<dyn ImportResolver>,69 inner: Box<dyn ImportResolver>,
69}70}
modifiedcrates/jsonnet-evaluator/src/lib.rsdiffbeforeafterboth
200 self.0200 self.0
201 .str_files201 .str_files
202 .borrow_mut()202 .borrow_mut()
203 .insert(path.clone(), file_str.into());203 .insert(path.clone(), file_str);
204 }204 }
205 Ok(self.0.str_files.borrow().get(&path).cloned().unwrap())205 Ok(self.0.str_files.borrow().get(&path).cloned().unwrap())
206 }206 }