Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Oct 23, 2017
1 parent bc19a8d commit af8a461
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To use `actix`, add this to your `Cargo.toml`:

```toml
[dependencies]
actix = "0.2"
actix = "0.3"
```

You may consider to check
Expand Down
4 changes: 2 additions & 2 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# CHANGES


## 0.3.0 (2017-10-xx)
## 0.3.0 (2017-10-23)

* Added `Either` future

* Message has to provide `ResponseType` impl, before Actor had to provide impl
* Message has to provide `ResponseType` impl instead of Actor


## 0.2.0 (2017-10-17)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ impl Actor for MyActor {
}

impl StreamHandler<Num> for MyActor {
fn finished(&mut self, ctx: &mut Self::Context) {
fn finished(&mut self, _: &mut Self::Context) {
Arbiter::system().send(msgs::SystemExit(0));
}
}

impl Handler<Num> for MyActor {

fn error(&mut self, err: (), ctx: &mut Self::Context) {
fn error(&mut self, _: (), _: &mut Self::Context) {
self.1.store(true, Ordering::Relaxed);
}

Expand Down
5 changes: 2 additions & 3 deletions tests/test_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl Actor for MyActor3 {

impl Handler<Ping> for MyActor3 {

fn handle(&mut self, msg: Ping, _: &mut Context<MyActor3>) -> Response<Self, Ping> {
fn handle(&mut self, _: Ping, _: &mut Context<MyActor3>) -> Response<Self, Ping> {
Arbiter::system().send(msgs::SystemExit(0));
Self::reply_error(())
}
Expand Down Expand Up @@ -156,8 +156,7 @@ fn test_error_result() {
addr.call_fut(Ping(0)).then(|res| {
match res {
Ok(Err(_)) => (),
Ok(Ok(_)) => panic!("Should not happen"),
Err(_) => panic!("Should not happen"),
_ => panic!("Should not happen"),
}
futures::future::result(Ok(()))
})
Expand Down
4 changes: 2 additions & 2 deletions tests/test_arbiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl Actor for MyActor {

impl Handler<Ping> for MyActor {

fn handle(&mut self, msg: Ping, _: &mut Context<MyActor>) -> Response<Self, Ping> {
fn handle(&mut self, _: Ping, _: &mut Context<MyActor>) -> Response<Self, Ping> {
self.0.store(self.0.load(Ordering::Relaxed) + 1, Ordering::Relaxed);
Arbiter::system().send(msgs::SystemExit(0));
Self::empty()
Expand All @@ -33,7 +33,7 @@ fn test_start_actor() {
let count = Arc::new(AtomicUsize::new(0));

let act_count = Arc::clone(&count);
let addr = Arbiter::start(move |ctx| {
let addr = Arbiter::start(move |_| {
MyActor(act_count)
});

Expand Down

0 comments on commit af8a461

Please sign in to comment.