Skip to content

Commit

Permalink
remove the non-sense arguments
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Sep 11, 2024
1 parent d1a8ea7 commit 12264d4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
13 changes: 0 additions & 13 deletions mm2src/common/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,19 +518,6 @@ pub fn set_panic_hook() {
}))
}

/// Simulates the panic-in-panic crash.
pub fn double_panic_crash() {
struct Panicker;
impl Drop for Panicker {
fn drop(&mut self) { panic!("panic in drop") }
}
let panicker = Panicker;
if 1 < 2 {
panic!("first panic")
}
drop(panicker) // Delays the drop.
}

/// RPC response, returned by the RPC handlers.
/// NB: By default the future is executed on the shared asynchronous reactor (`CORE`),
/// the handler is responsible for spawning the future on another reactor if it doesn't fit the `CORE` well.
Expand Down
11 changes: 0 additions & 11 deletions mm2src/mm2_main/src/mm2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

#[cfg(not(target_arch = "wasm32"))] use common::block_on;
use common::crash_reports::init_crash_reports;
use common::double_panic_crash;
use common::log::LogLevel;
use common::password_policy::password_policy;
use mm2_core::mm_ctx::MmCtxBuilder;
Expand Down Expand Up @@ -248,16 +247,6 @@ pub fn mm2_main(version: String, datetime: String) {
// we're not checking them for the mode switches in order not to risk [untrusted] data being mistaken for a mode switch.
let first_arg = args_os.get(1).and_then(|arg| arg.to_str());

if first_arg == Some("panic") {
panic!("panic message")
}
if first_arg == Some("crash") {
double_panic_crash()
}
if first_arg == Some("stderr") {
eprintln!("This goes to stderr");
return;
}
if first_arg == Some("update_config") {
match on_update_config(&args_os) {
Ok(_) => println!("Success"),
Expand Down

0 comments on commit 12264d4

Please sign in to comment.