diff --git a/serde_codegen/src/lib.rs b/serde_codegen/src/lib.rs index 3a8e94b1..a5c51a40 100644 --- a/serde_codegen/src/lib.rs +++ b/serde_codegen/src/lib.rs @@ -37,10 +37,13 @@ include!(concat!(env!("OUT_DIR"), "/lib.rs")); include!("lib.rs.in"); #[cfg(feature = "with-syntex")] -pub fn expand(src: &Path, dst: &Path) -> io::Result<()> { +pub fn expand(src: S, dst: D) -> io::Result<()> + where S: AsRef, + D: AsRef, +{ let mut registry = syntex::Registry::new(); register(&mut registry); - registry.expand("", src, dst) + registry.expand("", src.as_ref(), dst.as_ref()) } #[cfg(feature = "with-syntex")]