Skip to content

Commit 539252a

Browse files
Remove dead code (Restioson#227)
1 parent f9c4704 commit 539252a

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

xtra/examples/crude_bench.rs

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::future::Future;
2-
use std::time::{Duration, Instant};
2+
use std::time::Instant;
33

44
use futures_util::FutureExt;
55
use xtra::prelude::*;
@@ -42,34 +42,6 @@ impl Handler<GetCount> for Counter {
4242
}
4343
}
4444

45-
#[derive(xtra::Actor)]
46-
struct SendTimer {
47-
time: Duration,
48-
}
49-
50-
struct GetTime;
51-
52-
impl Handler<GetTime> for SendTimer {
53-
type Return = Duration;
54-
55-
async fn handle(&mut self, _time: GetTime, _ctx: &mut Context<Self>) -> Duration {
56-
self.time
57-
}
58-
}
59-
60-
#[derive(xtra::Actor)]
61-
struct ReturnTimer;
62-
63-
struct TimeReturn;
64-
65-
impl Handler<TimeReturn> for ReturnTimer {
66-
type Return = Instant;
67-
68-
async fn handle(&mut self, _time: TimeReturn, _ctx: &mut Context<Self>) -> Instant {
69-
Instant::now()
70-
}
71-
}
72-
7345
const COUNT: usize = 10_000_000; // May take a while on some machines
7446

7547
async fn do_address_benchmark<R>(

0 commit comments

Comments
 (0)