We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6facf7c commit 8789ce2Copy full SHA for 8789ce2
src/spi.rs
@@ -16,11 +16,11 @@ impl Spidev {
16
/// See [`spidev::Spidev::open`][0] for details.
17
///
18
/// [0]: https://docs.rs/spidev/0.5.0/spidev/struct.Spidev.html#method.open
19
- pub fn open<P>(path: P) -> io::Result<Self>
+ pub fn open<P>(path: P) -> Result<Self, SPIError>
20
where
21
P: AsRef<Path>,
22
{
23
- spidev::Spidev::open(path).map(Spidev)
+ spidev::Spidev::open(path).map(Spidev).map_err(|e| e.into())
24
}
25
26
0 commit comments