Skip to content

Commit 0a112c9

Browse files
committed
clippy: Use char instead of single-character string for splitn() separator
1 parent 4801274 commit 0a112c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/posts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl Post {
4040
let filename = path.file_name().unwrap().to_str().unwrap();
4141

4242
// we need to get the metadata out of the url
43-
let mut split = filename.splitn(4, "-");
43+
let mut split = filename.splitn(4, '-');
4444

4545
// we do some unwraps because these need to be valid
4646
let year = split.next().unwrap().parse::<i32>().unwrap();

0 commit comments

Comments
 (0)