Skip to content

Commit 1edbf26

Browse files
committed
updated formatting
1 parent 5ed0ec2 commit 1edbf26

6 files changed

Lines changed: 10 additions & 12 deletions

File tree

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ pub enum Commands {
6565
#[arg(short, long)]
6666
request_id: String,
6767
},
68-
}
68+
}

src/client.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ impl WebhookClient {
4242
.await
4343
.with_context(|| "Failed to read response body")?;
4444

45-
let requests: Vec<WebhookRequest> = serde_json::from_str(&response_text)
46-
.with_context(|| {
45+
let requests: Vec<WebhookRequest> =
46+
serde_json::from_str(&response_text).with_context(|| {
4747
format!(
4848
"Failed to parse response as JSON. Response body: {}",
4949
response_text
@@ -57,7 +57,7 @@ impl WebhookClient {
5757
.text()
5858
.await
5959
.unwrap_or_else(|_| "(failed to read response body)".to_string());
60-
60+
6161
anyhow::bail!(
6262
"HTTP {} {}: {}",
6363
status.as_u16(),
@@ -66,4 +66,4 @@ impl WebhookClient {
6666
);
6767
}
6868
}
69-
}
69+
}

src/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,4 @@ pub async fn show_request_details(
213213
print_request_details(&request);
214214

215215
Ok(())
216-
}
216+
}

src/display.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use colored::Colorize;
33
use syntect::easy::HighlightLines;
44
use syntect::highlighting::ThemeSet;
55
use syntect::parsing::SyntaxSet;
6-
use syntect::util::{as_24_bit_terminal_escaped, LinesWithEndings};
6+
use syntect::util::{LinesWithEndings, as_24_bit_terminal_escaped};
77

88
use crate::models::WebhookRequest;
99

@@ -30,7 +30,7 @@ pub fn print_request_body(request: &WebhookRequest) {
3030
} else {
3131
body.clone()
3232
};
33-
33+
3434
println!(
3535
"{}: {}",
3636
"Body".bright_blue().bold(),
@@ -241,4 +241,4 @@ pub fn get_body_preview(body: &Option<String>) -> String {
241241
}
242242
_ => "[BODY] (empty)".to_string(),
243243
}
244-
}
244+
}

src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,3 @@ async fn main() -> Result<()> {
101101

102102
Ok(())
103103
}
104-
105-

src/models.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ pub struct MessageObject {
2929
pub body: Option<String>,
3030
#[serde(rename = "BodyObject")]
3131
pub body_object: Option<serde_json::Value>,
32-
}
32+
}

0 commit comments

Comments
 (0)