I recently ran into an issue where i had a closure of signature F: FnOnce(&mut dyn TcpClientStack<TcpSocket = Handle, Error = Error>), which requires an impl of the embedded-nal traits for mutable references as impl<T: TcpClientStack> TcpClientStack for &mut T, in order to be used in functions like fn foo<T: TcpClientStack>(network: &mut T) { ... }.
This PR adds those blanket implementations for all the traits in this repo.
I recently ran into an issue where i had a closure of signature
F: FnOnce(&mut dyn TcpClientStack<TcpSocket = Handle, Error = Error>)
, which requires an impl of theembedded-nal
traits for mutable references asimpl<T: TcpClientStack> TcpClientStack for &mut T
, in order to be used in functions likefn foo<T: TcpClientStack>(network: &mut T) { ... }
.This PR adds those blanket implementations for all the traits in this repo.
This is also in line with the agreed upon way in
embedded-hal
: https://github.com/rust-embedded/embedded-hal/pull/310