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 # Common build inputs for all derivations
commonArgs = { 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; strictDeps = true;
buildInputs = with pkgs; [ buildInputs = with pkgs; [
@@ -64,20 +68,20 @@
nativeBuildInputs = commonArgs.nativeBuildInputs; nativeBuildInputs = commonArgs.nativeBuildInputs;
# Additional dev tools # Additional dev tools
packages = with pkgs; [ packages = [
rustToolchain rustToolchain
rust-analyzer pkgs.rust-analyzer
]; ];
RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library"; RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library";
}; };
ci = pkgs.mkShell { ci = pkgs.mkShell {
buildInputs = commonArgs.buildInputs ++ ([ buildInputs = commonArgs.buildInputs ++ [
pkgs.nodePackages.markdown-link-check pkgs.nodePackages.markdown-link-check
pkgs.nixpkgs-fmt pkgs.nixpkgs-fmt
pkgs.rustToolchain rustToolchain
]); ];
nativeBuildInputs = commonArgs.nativeBuildInputs; 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>, self: &'a RankedDifferentiableTagged<A, Tag, RANK>,
other: &'a RankedDifferentiableTagged<B, Tag2, RANK>, other: &'a RankedDifferentiableTagged<B, Tag2, RANK>,
f: &'b mut F, f: &mut F,
) -> RankedDifferentiableTagged<C, Tag3, RANK> ) -> RankedDifferentiableTagged<C, Tag3, RANK>
where where
F: FnMut(&Scalar<A>, Tag, &Scalar<B>, Tag2) -> (Scalar<C>, Tag3), F: FnMut(&Scalar<A>, Tag, &Scalar<B>, Tag2) -> (Scalar<C>, Tag3),
@@ -843,8 +843,7 @@ where
F: FnMut( F: FnMut(
&[DifferentiableTagged<A, Tag>; PARAM_RANK], &[DifferentiableTagged<A, Tag>; PARAM_RANK],
) -> RankedDifferentiableTagged<A, Tag, RANK>, ) -> RankedDifferentiableTagged<A, Tag, RANK>,
A: ?Sized A: Clone
+ Clone
+ Hash + Hash
+ AddAssign + AddAssign
+ Add<Output = A> + Add<Output = A>

View File

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