feat: Remove unused test commands

This commit is contained in:
timedout committed 2026-11-01 05:15:17 +00:00
1 parent 0e5c7cc640
commit 4ac23d8649
2 files changed
-56

No files matched your search

-8
View File
@@ -1,11 +1,9 @@
mod commands;
pub(crate) mod tester;
use clap::Subcommand;
use conduwuit::Result;
use ruma::OwnedServerName;
use self::tester::TesterCommand;
use crate::admin_command_dispatch;
#[admin_command_dispatch]
@@ -69,10 +67,4 @@ pub enum DebugCommand {
RoomsByExtremityCount {
page: Option<usize>,
},
/// Developer test stubs
#[command(subcommand)]
#[allow(non_snake_case)]
#[clap(hide(true))]
Tester(TesterCommand),
}
-48
View File
@@ -1,48 +0,0 @@
use conduwuit::{Err, Result};
use crate::admin_command_dispatch;
#[admin_command_dispatch]
#[derive(Debug, clap::Subcommand)]
pub enum TesterCommand {
Panic,
Failure,
Tester,
Timer,
}
#[allow(clippy::unused_async_trait_impl)]
impl crate::Context<'_> {
#[rustfmt::skip]
async fn panic(&self) -> Result {
panic!("panicked")
}
#[rustfmt::skip]
async fn failure(&self) -> Result {
Err!("failed")
}
#[inline(never)]
#[rustfmt::skip]
async fn tester(&self) -> Result {
self.write_str("Ok").await
}
#[inline(never)]
#[rustfmt::skip]
async fn timer(&self) -> Result {
let started = std::time::Instant::now();
timed(self.body);
let elapsed = started.elapsed();
self.write_str(&format!("completed in {elapsed:#?}")).await
}
}
#[inline(never)]
#[rustfmt::skip]
#[allow(unused_variables)]
fn timed(body: &[&str]) {
}