Skip to content

Commit 9c692b4

Browse files
bors[bot]Disasm
andauthored
Merge #32
32: Use AsRef<Path> instead of &Path r=posborne a=Disasm Co-authored-by: Vadim Kaushan <[email protected]>
2 parents 917f5e5 + 195dd20 commit 9c692b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/serial.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ pub struct Serial(pub TTYPort);
1515

1616
impl Serial {
1717
/// Wrapper for `serial_unix::TTYPort::open`
18-
pub fn open(path: &Path) -> Result<Serial, serial_core::Error> {
19-
Ok(Serial(TTYPort::open(path)?))
18+
pub fn open(path: impl AsRef<Path>) -> Result<Serial, serial_core::Error> {
19+
Ok(Serial(TTYPort::open(path.as_ref())?))
2020
}
2121
}
2222

0 commit comments

Comments
 (0)