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

difftreelog

fix remove unnecessary reference

Yaroslav Bolyukin2022-08-27parent: #3a6a304.patch.diff
in: master

2 files changed

modifiedcrates/jrsonnet-evaluator/src/lib.rsdiffbeforeafterboth
--- a/crates/jrsonnet-evaluator/src/lib.rs
+++ b/crates/jrsonnet-evaluator/src/lib.rs
@@ -387,7 +387,7 @@
 		let resolved = self.resolve_from(from, path)?;
 		self.import_resolved(resolved)
 	}
-	pub fn import(&self, path: &impl AsRef<Path>) -> Result<Val> {
+	pub fn import(&self, path: impl AsRef<Path>) -> Result<Val> {
 		let resolved = self.resolve(path)?;
 		self.import_resolved(resolved)
 	}
@@ -620,7 +620,7 @@
 
 	// Only panics in case of [`ImportResolver`] contract violation
 	#[allow(clippy::missing_panics_doc)]
-	pub fn resolve(&self, path: &impl AsRef<Path>) -> Result<SourcePath> {
+	pub fn resolve(&self, path: impl AsRef<Path>) -> Result<SourcePath> {
 		self.import_resolver().resolve(path.as_ref())
 	}
 	pub fn import_resolver(&self) -> Ref<dyn ImportResolver> {
modifiedcrates/jrsonnet-parser/src/lib.rsdiffbeforeafterboth
360360
361#[cfg(test)]361#[cfg(test)]
362pub mod tests {362pub mod tests {
363 use std::borrow::Cow;
364
365 use jrsonnet_interner::IStr;363 use jrsonnet_interner::IStr;
366 use BinaryOpType::*;364 use BinaryOpType::*;
373 parse(371 parse(
374 $s,372 $s,
375 &ParserSettings {373 &ParserSettings {
376 file_name: Source::new_virtual(Cow::Borrowed("<test>"), IStr::empty()),374 file_name: Source::new_virtual("<test>".into(), IStr::empty()),
377 },375 },
378 )376 )
379 .unwrap()377 .unwrap()
385 LocExpr(383 LocExpr(
386 std::rc::Rc::new($expr),384 std::rc::Rc::new($expr),
387 ExprLocation(385 ExprLocation(
388 Source::new_virtual(Cow::Borrowed("<test>"), IStr::empty()),386 Source::new_virtual("<test>".into(), IStr::empty()),
389 $from,387 $from,
390 $to,388 $to,
391 ),389 ),
721 fn add_location_info_to_all_sub_expressions() {719 fn add_location_info_to_all_sub_expressions() {
722 use Expr::*;720 use Expr::*;
723721
724 let file_name = Source::new_virtual(Cow::Borrowed("<test>"), IStr::empty());722 let file_name = Source::new_virtual("<test>".into(), IStr::empty());
725 let expr = parse(723 let expr = parse(
726 "{} { local x = 1, x: x } + {}",724 "{} { local x = 1, x: x } + {}",
727 &ParserSettings { file_name },725 &ParserSettings { file_name },