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.
splitn()
1 parent 4801274 commit 0a112c9Copy full SHA for 0a112c9
src/posts.rs
@@ -40,7 +40,7 @@ impl Post {
40
let filename = path.file_name().unwrap().to_str().unwrap();
41
42
// we need to get the metadata out of the url
43
- let mut split = filename.splitn(4, "-");
+ let mut split = filename.splitn(4, '-');
44
45
// we do some unwraps because these need to be valid
46
let year = split.next().unwrap().parse::<i32>().unwrap();
0 commit comments