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

difftreelog

refactor drop derivative dependency

Yaroslav Bolyukin2024-11-24parent: #a9a2382.patch.diff
in: master

5 files changed

modifiedCargo.lockdiffbeforeafterboth
after · Cargo.lock
158 packageslockfile v3
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -71,7 +71,6 @@
 static_assertions = "1.1"
 rustc-hash = "1.1"
 num-bigint = "0.4.5"
-derivative = "2.2.0"
 strsim = "0.11.0"
 proc-macro2 = "1.0"
 quote = "1.0"
modifiedcrates/jrsonnet-evaluator/Cargo.tomldiffbeforeafterboth
--- a/crates/jrsonnet-evaluator/Cargo.toml
+++ b/crates/jrsonnet-evaluator/Cargo.toml
@@ -59,5 +59,4 @@
 hi-doc = { workspace = true, optional = true }
 # Bigint
 num-bigint = { workspace = true, features = ["serde"], optional = true }
-derivative.workspace = true
 stacker = "0.1.15"
modifiedcrates/jrsonnet-evaluator/src/function/parse.rsdiffbeforeafterboth
--- a/crates/jrsonnet-evaluator/src/function/parse.rs
+++ b/crates/jrsonnet-evaluator/src/function/parse.rs
@@ -1,8 +1,7 @@
 use std::mem::replace;
 
-use jrsonnet_gcmodule::Trace;
 use jrsonnet_interner::IStr;
-use jrsonnet_parser::{LocExpr, ParamsDesc};
+use jrsonnet_parser::ParamsDesc;
 
 use super::{arglike::ArgsLike, builtin::BuiltinParam};
 use crate::{
modifiedcrates/jrsonnet-evaluator/src/val.rsdiffbeforeafterboth
--- a/crates/jrsonnet-evaluator/src/val.rs
+++ b/crates/jrsonnet-evaluator/src/val.rs
@@ -8,7 +8,6 @@
 	rc::Rc,
 };
 
-use derivative::Derivative;
 use jrsonnet_gcmodule::{Cc, Trace};
 use jrsonnet_interner::IStr;
 pub use jrsonnet_macros::Thunk;
@@ -402,8 +401,7 @@
 
 /// Represents jsonnet number
 /// Jsonnet numbers are finite f64, with NaNs disallowed
-#[derive(Trace, Clone, Copy, Derivative)]
-#[derivative(Debug = "transparent")]
+#[derive(Trace, Clone, Copy)]
 #[repr(transparent)]
 pub struct NumValue(f64);
 impl NumValue {
@@ -439,6 +437,11 @@
 		Some(self.cmp(other))
 	}
 }
+impl Debug for NumValue {
+	fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+		Debug::fmt(&self.0, f)
+	}
+}
 impl Display for NumValue {
 	fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 		Display::fmt(&self.0, f)