11//! Adapters to/from `std::io` traits.
22
3- #![ deny(
4- clippy:: missing_trait_methods,
5- reason = "Methods should be forwarded to the underlying type"
6- ) ]
7-
83use embedded_io:: Error as _;
94
105/// Adapter from `std::io` traits.
@@ -41,6 +36,10 @@ impl<T: ?Sized> embedded_io::ErrorType for FromStd<T> {
4136 type Error = std:: io:: Error ;
4237}
4338
39+ #[ deny(
40+ clippy:: missing_trait_methods,
41+ reason = "Methods should be forwarded to the underlying type"
42+ ) ]
4443impl < T : std:: io:: Read + ?Sized > embedded_io:: Read for FromStd < T > {
4544 fn read ( & mut self , buf : & mut [ u8 ] ) -> Result < usize , Self :: Error > {
4645 self . inner . read ( buf)
@@ -60,6 +59,10 @@ impl<T: std::io::Read + ?Sized> embedded_io::Read for FromStd<T> {
6059 }
6160}
6261
62+ #[ deny(
63+ clippy:: missing_trait_methods,
64+ reason = "Methods should be forwarded to the underlying type"
65+ ) ]
6366impl < T : std:: io:: BufRead + ?Sized > embedded_io:: BufRead for FromStd < T > {
6467 fn fill_buf ( & mut self ) -> Result < & [ u8 ] , Self :: Error > {
6568 self . inner . fill_buf ( )
@@ -70,6 +73,10 @@ impl<T: std::io::BufRead + ?Sized> embedded_io::BufRead for FromStd<T> {
7073 }
7174}
7275
76+ #[ deny(
77+ clippy:: missing_trait_methods,
78+ reason = "Methods should be forwarded to the underlying type"
79+ ) ]
7380impl < T : std:: io:: Write + ?Sized > embedded_io:: Write for FromStd < T > {
7481 fn write ( & mut self , buf : & [ u8 ] ) -> Result < usize , Self :: Error > {
7582 match self . inner . write ( buf) {
@@ -95,6 +102,10 @@ impl<T: std::io::Write + ?Sized> embedded_io::Write for FromStd<T> {
95102 }
96103}
97104
105+ #[ deny(
106+ clippy:: missing_trait_methods,
107+ reason = "Methods should be forwarded to the underlying type"
108+ ) ]
98109impl < T : std:: io:: Seek + ?Sized > embedded_io:: Seek for FromStd < T > {
99110 fn seek ( & mut self , pos : embedded_io:: SeekFrom ) -> Result < u64 , Self :: Error > {
100111 self . inner . seek ( pos. into ( ) )
0 commit comments