Skip to content

Commit 62dbb72

Browse files
committed
fixes
1 parent 1edbf26 commit 62dbb72

File tree

3 files changed

+14
-27
lines changed

3 files changed

+14
-27
lines changed

src/color_control.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff 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)]
2621
fn enable_ansi_support() {
2722
use windows_sys::Win32::Foundation::INVALID_HANDLE_VALUE;

src/config.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff 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
}

src/display.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ pub fn print_request_summary(request: &WebhookRequest) {
2323
}
2424

2525
pub 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

0 commit comments

Comments
 (0)