Skip to content

Commit

Permalink
use impl instead of generic type parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
crop2000 committed Dec 6, 2024
1 parent 2d88c57 commit d62ff2b
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions compiler/generator/rust/rust_code_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,23 +625,17 @@ void RustCodeContainer::generateComputeHeader(int n, std::ostream* fOut, int fNu
// Compute "compute" declaration
tab(n, *fOut);
tab(n, *fOut);
*fOut << "pub fn compute<I, O>(";
*fOut << "pub fn compute(";
tab(n + 1, *fOut);
*fOut << "&mut self,";
tab(n + 1, *fOut);
*fOut << "count: usize,";
tab(n + 1, *fOut);
*fOut << "inputs: &[I],";
*fOut << "inputs: &[impl AsRef<[FaustFloat]>],";
tab(n + 1, *fOut);
*fOut << "outputs: &mut[O],";
*fOut << "outputs: &mut[impl AsMut<[FaustFloat]>],";
tab(n, *fOut);
*fOut << ") where";
tab(n + 1, *fOut);
*fOut << "I: AsRef<[FaustFloat]>,";
tab(n + 1, *fOut);
*fOut << "O: AsMut<[FaustFloat]>,";
tab(n, *fOut);
*fOut << "{";
*fOut << ") {";
tab(n + 1, *fOut);
}

Expand Down

0 comments on commit d62ff2b

Please sign in to comment.