We must allow the run handler to mutate state

The handler may well need to close over and mutate state
This commit is contained in:
huntc
2021-10-15 17:44:23 +11:00
parent 34e9e85819
commit 3be274dc2a
2 changed files with 19 additions and 4 deletions

View File

@ -262,9 +262,9 @@ impl<'d, const N: usize> Saadc<'d, N> {
&mut self,
bufs: &mut [[i16; N0]; 2],
mode: Mode,
sampler: S,
mut sampler: S,
) where
S: Fn(&[i16]) -> SamplerState,
S: FnMut(&[i16]) -> SamplerState,
{
let r = Self::regs();