File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,4 +65,4 @@ pub enum Commands {
6565 #[ arg( short, long) ]
6666 request_id : String ,
6767 } ,
68- }
68+ }
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff line change @@ -213,4 +213,4 @@ pub async fn show_request_details(
213213 print_request_details ( & request) ;
214214
215215 Ok ( ( ) )
216- }
216+ }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use colored::Colorize;
33use syntect:: easy:: HighlightLines ;
44use syntect:: highlighting:: ThemeSet ;
55use syntect:: parsing:: SyntaxSet ;
6- use syntect:: util:: { as_24_bit_terminal_escaped , LinesWithEndings } ;
6+ use syntect:: util:: { LinesWithEndings , as_24_bit_terminal_escaped } ;
77
88use 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+ }
Original file line number Diff line number Diff line change @@ -101,5 +101,3 @@ async fn main() -> Result<()> {
101101
102102 Ok ( ( ) )
103103}
104-
105-
Original file line number Diff line number Diff 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+ }
You can’t perform that action at this time.
0 commit comments