diff --git a/src/lib.rs b/src/lib.rs index bdceaf8..f35963b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ use std::{ fd::AsRawFd, raw::{c_uint, c_ulong}, }, - path::PathBuf, + path::Path, }; pub mod pps; @@ -21,7 +21,7 @@ const PPS_FETCH: c_ulong = 0xc00870a4; pub struct PpsDevice(File); impl PpsDevice { - pub fn new(path: PathBuf) -> Result { + pub fn new>(path: P) -> Result { Ok(PpsDevice(File::open(path)?)) }