Modernise
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/push/all-checks-complete Pipeline was successful
ci/woodpecker/pr/all-checks-complete unknown status

This commit is contained in:
Smaug123
2025-09-08 23:18:44 +01:00
parent 3559fce275
commit 166f4bf4b9
3 changed files with 14 additions and 10 deletions

View File

@@ -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;

View File

@@ -727,10 +727,10 @@ impl<A, Tag, const RANK: usize> RankedDifferentiableTagged<A, Tag, RANK> {
}
}
pub fn map2_tagged<'a, 'b, B, C, Tag2, Tag3, F>(
pub fn map2_tagged<'a, B, C, Tag2, Tag3, F>(
self: &'a RankedDifferentiableTagged<A, Tag, RANK>,
other: &'a RankedDifferentiableTagged<B, Tag2, RANK>,
f: &'b mut F,
f: &mut F,
) -> RankedDifferentiableTagged<C, Tag3, RANK>
where
F: FnMut(&Scalar<A>, Tag, &Scalar<B>, Tag2) -> (Scalar<C>, Tag3),
@@ -843,8 +843,7 @@ where
F: FnMut(
&[DifferentiableTagged<A, Tag>; PARAM_RANK],
) -> RankedDifferentiableTagged<A, Tag, RANK>,
A: ?Sized
+ Clone
A: Clone
+ Hash
+ AddAssign
+ Add<Output = A>

View File

@@ -32,6 +32,7 @@ where
}
#[must_use]
#[expect(clippy::type_complexity)]
pub fn dense<'b, A, Tag>(
input_len: usize,
neuron_count: usize,