Skip to content

Commit

Permalink
Remove dead code (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger authored Jul 5, 2024
1 parent f9c4704 commit 539252a
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions xtra/examples/crude_bench.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::future::Future;
use std::time::{Duration, Instant};
use std::time::Instant;

use futures_util::FutureExt;
use xtra::prelude::*;
Expand Down Expand Up @@ -42,34 +42,6 @@ impl Handler<GetCount> for Counter {
}
}

#[derive(xtra::Actor)]
struct SendTimer {
time: Duration,
}

struct GetTime;

impl Handler<GetTime> for SendTimer {
type Return = Duration;

async fn handle(&mut self, _time: GetTime, _ctx: &mut Context<Self>) -> Duration {
self.time
}
}

#[derive(xtra::Actor)]
struct ReturnTimer;

struct TimeReturn;

impl Handler<TimeReturn> for ReturnTimer {
type Return = Instant;

async fn handle(&mut self, _time: TimeReturn, _ctx: &mut Context<Self>) -> Instant {
Instant::now()
}
}

const COUNT: usize = 10_000_000; // May take a while on some machines

async fn do_address_benchmark<R>(
Expand Down

0 comments on commit 539252a

Please sign in to comment.