summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 049ba55..6cd13e2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -34,9 +34,9 @@ pub fn run<R: Read, W: Write>(
}
// convert to expected renderer input
- let refs: Vec<(&str, &[u8])> = owned
+ let refs: Vec<(&Path, &[u8])> = owned
.iter()
- .map(|(p, b)| (p.to_str().unwrap(), b.as_slice()))
+ .map(|(p, b)| (p.as_path(), b.as_slice()))
.collect();
let rendered = render("Project name", &refs)?;
@@ -74,7 +74,7 @@ mod tests {
let output_str = String::from_utf8(output).unwrap();
- assert!(output_str.contains("### test_main.rs"));
+ assert!(output_str.contains("### \"test_main.rs\""));
assert!(output_str.contains("fn main() {}"));
// cleanup
@@ -114,7 +114,7 @@ mod tests {
let output = String::from_utf8(output).unwrap();
- assert!(output.contains("### test/main.rs"));
+ assert!(output.contains("### \"test/main.rs\""));
fs::remove_file("test/main.rs").unwrap();
fs::remove_dir("test").unwrap();