git.delta.rocks / jrsonnet / refs/commits / 6b07ec04fd46

difftreelog

style fix clippy warnings

Yaroslav Bolyukin2021-04-30parent: #1656c74.patch.diff
in: master

5 files changed

modifiedcrates/jrsonnet-evaluator/src/ctx.rsdiffbeforeafterboth
--- a/crates/jrsonnet-evaluator/src/ctx.rs
+++ b/crates/jrsonnet-evaluator/src/ctx.rs
@@ -38,7 +38,7 @@
 #[derive(Debug, Clone)]
 pub struct Context(Rc<ContextInternals>);
 impl Context {
-	pub fn new_future() -> FutureWrapper<Context> {
+	pub fn new_future() -> FutureWrapper<Self> {
 		FutureWrapper::new()
 	}
 
@@ -71,7 +71,7 @@
 			.cloned()
 			.ok_or(VariableIsNotDefined(name))?)
 	}
-	pub fn into_future(self, ctx: FutureWrapper<Context>) -> Self {
+	pub fn into_future(self, ctx: FutureWrapper<Self>) -> Self {
 		{
 			ctx.0.borrow_mut().replace(self);
 		}
modifiedcrates/jrsonnet-evaluator/src/lib.rsdiffbeforeafterboth
--- a/crates/jrsonnet-evaluator/src/lib.rs
+++ b/crates/jrsonnet-evaluator/src/lib.rs
@@ -1,6 +1,6 @@
 #![cfg_attr(feature = "unstable", feature(stmt_expr_attributes))]
-#![allow(macro_expanded_macro_exports_accessed_by_absolute_paths)]
 #![warn(clippy::all, clippy::nursery)]
+#![allow(macro_expanded_macro_exports_accessed_by_absolute_paths, clippy::ptr_arg)]
 
 mod builtin;
 mod ctx;
@@ -429,7 +429,7 @@
 	}
 
 	pub fn resolve_file(&self, from: &PathBuf, path: &PathBuf) -> Result<Rc<PathBuf>> {
-		Ok(self.settings().import_resolver.resolve_file(from, path)?)
+		self.settings().import_resolver.resolve_file(from, path)
 	}
 	pub fn load_file_contents(&self, path: &PathBuf) -> Result<IStr> {
 		self.settings().import_resolver.load_file_contents(path)
modifiedcrates/jrsonnet-evaluator/src/obj.rsdiffbeforeafterboth
--- a/crates/jrsonnet-evaluator/src/obj.rs
+++ b/crates/jrsonnet-evaluator/src/obj.rs
@@ -173,7 +173,7 @@
 	pub fn extend_with_field(self, key: IStr, value: ObjMember) -> Self {
 		let mut new = FxHashMap::with_capacity_and_hasher(1, BuildHasherDefault::default());
 		new.insert(key, value);
-		ObjValue::new(Some(self), Rc::new(new))
+		Self::new(Some(self), Rc::new(new))
 	}
 
 	pub(crate) fn get_raw(&self, key: IStr, real_this: Option<&Self>) -> Result<Option<Val>> {
modifiedcrates/jrsonnet-parser/src/lib.rsdiffbeforeafterboth
1#![allow(clippy::redundant_closure_call)]
2
1use peg::parser;3use peg::parser;
2use std::{path::PathBuf, rc::Rc};4use std::{path::PathBuf, rc::Rc};
modifiedcrates/jrsonnet-types/src/lib.rsdiffbeforeafterboth
--- a/crates/jrsonnet-types/src/lib.rs
+++ b/crates/jrsonnet-types/src/lib.rs
@@ -1,3 +1,5 @@
+#![allow(clippy::redundant_closure_call)]
+
 use std::fmt::Display;
 
 #[macro_export]