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.
2 parents 917f5e5 + 195dd20 commit 9c692b4Copy full SHA for 9c692b4
src/serial.rs
@@ -15,8 +15,8 @@ pub struct Serial(pub TTYPort);
15
16
impl Serial {
17
/// Wrapper for `serial_unix::TTYPort::open`
18
- pub fn open(path: &Path) -> Result<Serial, serial_core::Error> {
19
- Ok(Serial(TTYPort::open(path)?))
+ pub fn open(path: impl AsRef<Path>) -> Result<Serial, serial_core::Error> {
+ Ok(Serial(TTYPort::open(path.as_ref())?))
20
}
21
22
0 commit comments