diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-05 15:48:16 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-05 15:48:16 +0100 |
| commit | b17907faf8d9693cef94a6048d802bd4ced9102f (patch) | |
| tree | 1bd87c40e85af675a96b63672163b4caaa174364 /src/command | |
| parent | d7fef30ac3f539975ef9edbba8e0af4a4e9ff3de (diff) | |
Deal with all lints
Diffstat (limited to 'src/command')
| -rw-r--r-- | src/command/generate.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command/generate.rs b/src/command/generate.rs index a79058d..b74b33b 100644 --- a/src/command/generate.rs +++ b/src/command/generate.rs @@ -16,12 +16,12 @@ impl Generate { Generate } - fn read_posts(&self, posts_directory: &Path, max_posts: u8) -> Vec<Post> { + fn read_posts(posts_directory: &Path, max_posts: u8) -> Vec<Post> { let mut posts = Vec::new(); for i in 0..max_posts { let post_path = posts_directory.join(i.to_string()); - match self.read_post(&post_path, i) { + match Generate::read_post(&post_path, i) { Some(post) => posts.push(post), None => continue, } @@ -49,7 +49,7 @@ impl Generate { None } - fn read_post(&self, post_directory: &Path, index: u8) -> Option<Post> { + fn read_post(post_directory: &Path, index: u8) -> Option<Post> { let metadata_path = post_directory.join(METADATA_FILENAME); let metadata = Metadata::read_or_create(&metadata_path); let raw = Generate::find_blog_content(post_directory)?; @@ -73,7 +73,7 @@ impl super::Command for Generate { let _ = remove_dir_all(&configuration.blog_output_directory); create_dir_all(&configuration.blog_output_directory)?; - let posts = self.read_posts(&configuration.posts_directory, configuration.max_posts); + let posts = Generate::read_posts(&configuration.posts_directory, configuration.max_posts); generate( &configuration.static_directory, &configuration.templates_directory, |