Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
its-the-shrimp committed Sep 27, 2023
1 parent 3acfb4e commit 8d60386
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tools/changelog/src/create_log_line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn create_log_line(
package_labels: &'static [&'static str],
oid: Result<Oid, Error>,
token: Option<String>,
user_fetcher: &mut GitHubUsersFetcher
user_fetcher: &mut GitHubUsersFetcher,
) -> Result<Option<LogLine>> {
println!("Commit oid: {oid:?}");
let oid = oid?;
Expand All @@ -33,7 +33,8 @@ pub fn create_log_line(
.to_string();
let author = commit.author();
let author_name = author.name().unwrap_or("Unknown");
let author_id = user_fetcher.fetch_user_by_commit_author(author_name, commit.id().to_string(), token.clone())
let author_id = user_fetcher
.fetch_user_by_commit_author(author_name, commit.id().to_string(), token.clone())
.context("Missing author's GitHub ID")?;
let email = author.email().context("Missing author's email")?;

Expand Down
5 changes: 4 additions & 1 deletion tools/changelog/src/create_log_lines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ pub fn create_log_lines(
revwalk.push(to_oid)?;

revwalk
.filter_map(|oid| create_log_line(&repo, package_labels, oid, token.clone(), &mut user_fetcher).transpose())
.filter_map(|oid| {
create_log_line(&repo, package_labels, oid, token.clone(), &mut user_fetcher)
.transpose()
})
.collect()
}
2 changes: 1 addition & 1 deletion tools/changelog/src/get_latest_version.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::{Result, Context};
use anyhow::{Context, Result};
use git2::Repository;
use semver::{Error, Version};

Expand Down
2 changes: 2 additions & 0 deletions tools/changelog/src/write_log_lines.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use std::io::Write;

use anyhow::Result;

use crate::log_line::LogLine;

pub fn write_log_lines(log_lines: Vec<LogLine>) -> Result<Vec<u8>> {
Expand Down

0 comments on commit 8d60386

Please sign in to comment.