Skip to content

Fix clippy warnings #1210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/blogs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fn load_recursive(
Ok(())
}

fn add_postfix_slash<S>(path: &PathBuf, serializer: S) -> Result<S::Ok, S::Error>
fn add_postfix_slash<S>(path: &Path, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl<'a> Generator<'a> {
}

fn render_releases_feed(&self, blog: &Blog) -> eyre::Result<()> {
let posts = blog.posts().iter().cloned().collect::<Vec<_>>();
let posts = blog.posts().to_vec();
let is_released: Vec<&Post> = posts.iter().filter(|post| post.release).collect();
let releases: Vec<ReleasePost> = is_released
.iter()
Expand Down
2 changes: 1 addition & 1 deletion src/posts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl Post {
let filename = path.file_name().unwrap().to_str().unwrap();

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

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