File tree Expand file tree Collapse file tree 3 files changed +14
-27
lines changed
Expand file tree Collapse file tree 3 files changed +14
-27
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,6 @@ pub fn init(no_color: bool) {
1717 }
1818}
1919
20- // Allow other modules to check whether colors should be emitted.
21- pub fn is_color_enabled ( ) -> bool {
22- !* NO_COLOR . get ( ) . unwrap_or ( & false )
23- }
24-
2520#[ cfg( windows) ]
2621fn enable_ansi_support ( ) {
2722 use windows_sys:: Win32 :: Foundation :: INVALID_HANDLE_VALUE ;
Original file line number Diff line number Diff line change @@ -56,12 +56,4 @@ impl Config {
5656 pub fn get_base_url ( & self ) -> & str {
5757 & self . webhook . base_url
5858 }
59-
60- pub fn get_default_count ( & self ) -> u32 {
61- self . webhook . default_count
62- }
63-
64- pub fn get_default_interval ( & self ) -> u64 {
65- self . webhook . default_interval
66- }
6759}
Original file line number Diff line number Diff line change @@ -23,20 +23,20 @@ pub fn print_request_summary(request: &WebhookRequest) {
2323}
2424
2525pub fn print_request_body ( request : & WebhookRequest ) {
26- if let Some ( body) = & request. message_object . body {
27- if !body. trim ( ) . is_empty ( ) {
28- let display_body = if body . chars ( ) . count ( ) > 200 {
29- format ! ( "{}..." , body. chars( ) . take ( 200 ) . collect :: < String > ( ) )
30- } else {
31- body . clone ( )
32- } ;
33-
34- println ! (
35- "{}: {}" ,
36- "Body" . bright_blue ( ) . bold ( ) ,
37- display_body . bright_white ( )
38- ) ;
39- }
26+ if let Some ( body) = & request. message_object . body
27+ && !body. trim ( ) . is_empty ( )
28+ {
29+ let display_body = if body. chars ( ) . count ( ) > 200 {
30+ format ! ( "{}..." , body . chars ( ) . take ( 200 ) . collect :: < String > ( ) )
31+ } else {
32+ body . clone ( )
33+ } ;
34+
35+ println ! (
36+ "{}: {}" ,
37+ "Body" . bright_blue ( ) . bold ( ) ,
38+ display_body . bright_white ( )
39+ ) ;
4040 }
4141}
4242
You can’t perform that action at this time.
0 commit comments