Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Oct 14, 2023
1 parent 84017db commit ab54009
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/handlers/validate_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use crate::{
config::ValidateConfig,
github::{IssuesAction},
github::IssuesAction,
handlers::{Context, IssuesEvent},
};
use tracing as log;
Expand Down Expand Up @@ -72,7 +72,9 @@ async fn validate_triagebot_config(ctx: &Context, event: &IssuesEvent) -> Result
match toml::from_slice::<crate::handlers::Config>(&triagebot_toml) {
Ok(_) => return Ok(()),
Err(e) => {
let position = e.line_col().map(|(line, col)| format!("{}:{}", line + 1, col + 1));
let position = e
.line_col()
.map(|(line, col)| format!("{}:{}", line + 1, col + 1));
let triagebot_toml_blob_url = event
.issue
.files(&ctx.github)
Expand All @@ -92,11 +94,7 @@ async fn validate_triagebot_config(ctx: &Context, event: &IssuesEvent) -> Result

return Err(format!(
"Invalid triagebot.toml at position {}",
format!(
"[{}]({})",
position.unwrap_or_default(),
absolute_url
)
format!("[{}]({})", position.unwrap_or_default(), absolute_url)
));
}
}
Expand Down

0 comments on commit ab54009

Please sign in to comment.