diff --git a/flake.nix b/flake.nix
index 77bd2bb..e2803fb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -27,7 +27,11 @@
# Common build inputs for all derivations
commonArgs = {
- src = pkgs.lib.cleanSourceWith { src = ./.; name = "source"; filter = path: type: (builtins.match ".*csv$" path != null || craneLib.filterCargoSources path type); };
+ src = pkgs.lib.cleanSourceWith {
+ src = ./.;
+ name = "source";
+ filter = path: type: (builtins.match ".*csv$" path != null || craneLib.filterCargoSources path type);
+ };
strictDeps = true;
buildInputs = with pkgs; [
@@ -64,20 +68,20 @@
nativeBuildInputs = commonArgs.nativeBuildInputs;
# Additional dev tools
- packages = with pkgs; [
+ packages = [
rustToolchain
- rust-analyzer
+ pkgs.rust-analyzer
];
RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library";
};
ci = pkgs.mkShell {
- buildInputs = commonArgs.buildInputs ++ ([
+ buildInputs = commonArgs.buildInputs ++ [
pkgs.nodePackages.markdown-link-check
pkgs.nixpkgs-fmt
- pkgs.rustToolchain
- ]);
+ rustToolchain
+ ];
nativeBuildInputs = commonArgs.nativeBuildInputs;
diff --git a/little_learner/src/auto_diff.rs b/little_learner/src/auto_diff.rs
index eede557..0ba0870 100644
--- a/little_learner/src/auto_diff.rs
+++ b/little_learner/src/auto_diff.rs
@@ -727,10 +727,10 @@ impl RankedDifferentiableTagged {
}
}
- pub fn map2_tagged<'a, 'b, B, C, Tag2, Tag3, F>(
+ pub fn map2_tagged<'a, B, C, Tag2, Tag3, F>(
self: &'a RankedDifferentiableTagged,
other: &'a RankedDifferentiableTagged,
- f: &'b mut F,
+ f: &mut F,
) -> RankedDifferentiableTagged
where
F: FnMut(&Scalar, Tag, &Scalar, Tag2) -> (Scalar, Tag3),
@@ -843,8 +843,7 @@ where
F: FnMut(
&[DifferentiableTagged; PARAM_RANK],
) -> RankedDifferentiableTagged,
- A: ?Sized
- + Clone
+ A: Clone
+ Hash
+ AddAssign
+ Add