aboutsummaryrefslogtreecommitdiff
path: root/embassy-sync/src/pipe.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-08-07 13:43:09 +0200
committerGitHub <[email protected]>2023-08-07 13:43:09 +0200
commit5d5cd2371504915a531e669dce3558485a51a2e1 (patch)
tree5d0093e9e5005d3a946e92686a9dc79565c3043f /embassy-sync/src/pipe.rs
parent77844e2055319e1af7dd50fdb2e39ef88c6a5010 (diff)
Update to embedded-io 0.5 (#1752)
Diffstat (limited to 'embassy-sync/src/pipe.rs')
-rw-r--r--embassy-sync/src/pipe.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/embassy-sync/src/pipe.rs b/embassy-sync/src/pipe.rs
index 13bf4ef01..6e3e77b49 100644
--- a/embassy-sync/src/pipe.rs
+++ b/embassy-sync/src/pipe.rs
@@ -381,17 +381,17 @@ mod io_impls {
381 381
382 use super::*; 382 use super::*;
383 383
384 impl<M: RawMutex, const N: usize> embedded_io::Io for Pipe<M, N> { 384 impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for Pipe<M, N> {
385 type Error = Infallible; 385 type Error = Infallible;
386 } 386 }
387 387
388 impl<M: RawMutex, const N: usize> embedded_io::asynch::Read for Pipe<M, N> { 388 impl<M: RawMutex, const N: usize> embedded_io_async::Read for Pipe<M, N> {
389 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 389 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
390 Ok(Pipe::read(self, buf).await) 390 Ok(Pipe::read(self, buf).await)
391 } 391 }
392 } 392 }
393 393
394 impl<M: RawMutex, const N: usize> embedded_io::asynch::Write for Pipe<M, N> { 394 impl<M: RawMutex, const N: usize> embedded_io_async::Write for Pipe<M, N> {
395 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 395 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
396 Ok(Pipe::write(self, buf).await) 396 Ok(Pipe::write(self, buf).await)
397 } 397 }
@@ -401,17 +401,17 @@ mod io_impls {
401 } 401 }
402 } 402 }
403 403
404 impl<M: RawMutex, const N: usize> embedded_io::Io for &Pipe<M, N> { 404 impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for &Pipe<M, N> {
405 type Error = Infallible; 405 type Error = Infallible;
406 } 406 }
407 407
408 impl<M: RawMutex, const N: usize> embedded_io::asynch::Read for &Pipe<M, N> { 408 impl<M: RawMutex, const N: usize> embedded_io_async::Read for &Pipe<M, N> {
409 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 409 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
410 Ok(Pipe::read(self, buf).await) 410 Ok(Pipe::read(self, buf).await)
411 } 411 }
412 } 412 }
413 413
414 impl<M: RawMutex, const N: usize> embedded_io::asynch::Write for &Pipe<M, N> { 414 impl<M: RawMutex, const N: usize> embedded_io_async::Write for &Pipe<M, N> {
415 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 415 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
416 Ok(Pipe::write(self, buf).await) 416 Ok(Pipe::write(self, buf).await)
417 } 417 }
@@ -421,21 +421,21 @@ mod io_impls {
421 } 421 }
422 } 422 }
423 423
424 impl<M: RawMutex, const N: usize> embedded_io::Io for Reader<'_, M, N> { 424 impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for Reader<'_, M, N> {
425 type Error = Infallible; 425 type Error = Infallible;
426 } 426 }
427 427
428 impl<M: RawMutex, const N: usize> embedded_io::asynch::Read for Reader<'_, M, N> { 428 impl<M: RawMutex, const N: usize> embedded_io_async::Read for Reader<'_, M, N> {
429 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { 429 async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
430 Ok(Reader::read(self, buf).await) 430 Ok(Reader::read(self, buf).await)
431 } 431 }
432 } 432 }
433 433
434 impl<M: RawMutex, const N: usize> embedded_io::Io for Writer<'_, M, N> { 434 impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for Writer<'_, M, N> {
435 type Error = Infallible; 435 type Error = Infallible;
436 } 436 }
437 437
438 impl<M: RawMutex, const N: usize> embedded_io::asynch::Write for Writer<'_, M, N> { 438 impl<M: RawMutex, const N: usize> embedded_io_async::Write for Writer<'_, M, N> {
439 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> { 439 async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
440 Ok(Writer::write(self, buf).await) 440 Ok(Writer::write(self, buf).await)
441 } 441 }