From ec2d339a86f8c3c38de8c9f3d47274bf3601779d Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 9 Jan 2024 08:08:38 +0400 Subject: Add panic subcommand to check backtraces --- src/utils.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/utils.rs') diff --git a/src/utils.rs b/src/utils.rs index e43ba67d..ddd38dc6 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -190,3 +190,9 @@ pub fn show_screenshot_notification(image_path: Option) { warn!("error showing screenshot notification: {err:?}"); } } + +pub fn cause_panic() { + let a = Duration::from_secs(1); + let b = Duration::from_secs(2); + let _ = a - b; +} -- cgit