Repository: actix/actix (language: rust)

Issue:
Actix 0.10 roadmap
Rough thoughts:

- [x] #324 
  - [x] update `trust-dns-resolver` to 0.19.0 or higher (#345)
- [x] #335
- [x] #405 make `Request` `Send`


(deferred to later release) #314 (https://github.com/actix/actix/issues/337#issuecomment-652185348)
This example has failed
```rust
 use actix::prelude::*;
 #[derive(Message)]
 #[rtype(result = "()")]
 struct Die;

 struct MyActor;

 impl Actor for MyActor {
     type Context = Context<Self>;
 }

 // To use actor with supervisor actor has to implement `Supervised` trait
 impl actix::Supervised for MyActor {
     fn restarting(&mut self, ctx: &mut Context<MyActor>) {
         println!("restarting");
     }
 }

 impl Handler<Die> for MyActor {
     type Result = ();

     fn handle(&mut self, _: Die, ctx: &mut Context<MyActor>) {
         ctx.stop();
 #       System::current().stop();
     }
 }

 fn main() {
     System::run(|| {
         let addr = actix::Supervisor::start(|_| MyActor);

         addr.do_send(Die);
     });
 }
```

The restarting method cannot be executed.

This example can be executed.

```rust
use actix::prelude::*;
use futures::FutureExt;

#[derive(Message)]
#[rtype(result = "i32")]
struct Die;
#[derive(Default)]
struct MyActor;
impl Actor for MyActor {
    type Context = Context<Self>;
}

// To use actor with supervisor actor has to implement `Supervised` trait
impl actix::Supervised for MyActor {
    fn restarting(&mut self, ctx: &mut Context<MyActor>) {
        println!("restarting");
    }
}
impl Handler<Die> for MyActor {
    type Result = ();

    fn handle(&mut self, _: Die, ctx: &mut Context<MyActor>) -> Self::Result {
        ctx.stop();
        println!("Die");
        //       System::current().stop();
    }
}

fn main() {
    let system = System::new("test");

    let addr = actix::Supervisor::start(|_| MyActor);

    addr.do_send(Die);
    // send message and get future for result
    println!("second");
    system.run();
}
```


Discussion / hints:
Would be very nice if you could update trust-dns-resolver to 0.19+ ASAP since actix stack is broken in Fedora right now due to that.
v0.10.0-alpha.1 is released, let's see if there are any fallout.
Greeting, would this one https://github.com/actix/actix/issues/314 be considerable of 0.10 roadmap, as of upgrading from 0.8 the map_err and and_then was removed since 0.9. 
In the interests of having stable dependencies for actix-web v3 crates we're going to go ahead and push the try extensions traits enhancement to a later release to give it a proper testing cycle. 
The problem with the first example is that the system will only actually start to run _after_ the provided closure as executed, and by the time the closure finished the `Addr` will be dropped, and with no live references the `Actor` will stop. If we make the `Addr` live logger than the closure you will see the "restarting" being printed to stdout.

Here a quick way to make the `Addr` not being dropped on the first example:
```Rust
fn main() {
    System::run(|| {
        let addr = actix::Supervisor::start(|_| MyActor);

        addr.do_send(Die);
        std::mem::forget(addr);
        println!("second");
    });
}
```

The reason this works as you expect in the second example is that when `system.run()` is called the `Addr` is still in scope.
I'm going to close this issue in favor of https://github.com/actix/actix/issues/370#issuecomment-603619669, thanks!
Maybe this should  be reopened to track the documentation update.
As of 0.10.0-alpha.3 the example in the doc is still broken.

https://docs.rs/actix/0.10.0-alpha.3/actix/struct.Supervisor.html

Fix patch:
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index bcc4b6f69..db679901f 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -18,7 +18,7 @@ jobs:
           - nightly
 
     name: ${{ matrix.version }} - x86_64-apple-darwin
-    runs-on: macOS-latest
+    runs-on: macos-latest
 
     steps:
       - uses: actions/checkout@master
@@ -34,19 +34,21 @@ jobs:
         uses: actions-rs/cargo@v1
         with:
           command: generate-lockfile
-      - name: Cache cargo dirs
-        uses: actions/cache@v2
-        with:
-          path: |
-            ~/.cargo/registry
-            ~/.cargo/git
-            ~/.cargo/bin
-          key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-${{ hashFiles('**/Cargo.lock') }}
-      - name: Cache cargo build
-        uses: actions/cache@v2
-        with:
-          path: target
-          key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }}
+
+      # - name: Cache cargo dirs
+      #   uses: actions/cache@v2
+      #   with:
+      #     path: |
+      #       ~/.cargo/registry
+      #       ~/.cargo/git
+      #       ~/.cargo/bin
+      #     key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-${{ hashFiles('**/Cargo.lock') }}
+
+      # - name: Cache cargo build
+      #   uses: actions/cache@v2
+      #   with:
+      #     path: target
+      #     key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }}
 
       - name: check build
         uses: actions-rs/cargo@v1
@@ -59,10 +61,8 @@ jobs:
         timeout-minutes: 40
         with:
           command: test
-          args: --all --all-features --no-fail-fast -- --nocapture
-                --skip=test_stream_timeout
-
-      - name: Clear the cargo caches
-        run: |
-          which cargo-cache || cargo install cargo-cache --no-default-features --features ci-autoclean
-          cargo-cache
+          args: --all --all-features --no-fail-fast -- --nocapture --skip=test_stream_timeout
+      # - name: Clear the cargo caches
+      #   run: |
+      #     which cargo-cache || cargo install cargo-cache --no-default-features --features ci-autoclean
+      #     cargo-cache
diff --git a/CHANGES.md b/CHANGES.md
index f6a2698c0..80631bd7f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,31 +1,26 @@
 # CHANGES
 
-## [unreleased]
+## Unreleased - 2020-xx-xx
 
-### Changed
-
-* BREAKING: `SinkWrite::write` calls now send all items correctly using an internal buffer. [#384]
 
+## 0.10.0 - 2020-09-10
+### Changed
+* `SinkWrite::write` calls now send all items correctly using an internal buffer. [#384]
 * Add `Sync` bound for `Box<dyn Sender>` trait object that making `Recipient` a `Send` + `Sync` type. [#403]
-
 * Update `parking_lot` to 0.11 [#404]
-
-* Remove unnecessary `PhantomData` field from `Request` making it `Send + Sync`
-  regardless if `Request`'s type-argument is `Send` or `Sync` [#407]
+* Remove unnecessary `PhantomData` field from `Request` making it `Send + Sync` regardless if
+  `Request`'s type-argument is `Send` or `Sync` [#407]
 
 [#384]: https://github.com/actix/actix/pull/384
 [#403]: https://github.com/actix/actix/pull/403
 [#404]: https://github.com/actix/actix/pull/404
 [#407]: https://github.com/actix/actix/pull/407
 
-## [0.10.0-alpha.3] - 2020-05-13
 
+## 0.10.0-alpha.3 - 2020-05-13
 ### Changed
-
 * Update `tokio-util` dependency to 0.3, `FramedWrite` trait bound is changed. [#365]
-
 * Only poll dropped ContextFut if event loop is running. [#374]
-
 * Minimum Rust version is now 1.40 (to be able to use `#[cfg(doctest)]`)
 
 [#365]: https://github.com/actix/actix/pull/365
diff --git a/Cargo.toml b/Cargo.toml
index 57f226250..156e02cac 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "actix"
-version = "0.10.0-alpha.3"
+version = "0.10.0"
 authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
 description = "Actor framework for Rust"
 readme = "README.md"
@@ -23,14 +23,14 @@ members = ["examples/chat"]
 [features]
 default = ["resolver"]
 
-# dns resolver
+# DNS resolver
 resolver = ["trust-dns-proto", "trust-dns-resolver"]
 
 # Adds assertion to prevent processing too many messages on event loop
 mailbox_assert = []
 
 [dependencies]
-actix-rt = "1.1"
+actix-rt = "1.1.1"
 actix_derive = "0.5"
 bytes = "0.5.3"
 crossbeam-channel = "0.4"
@@ -39,9 +39,9 @@ futures-channel = { version = "0.3.1", default-features = false }
 futures-util = { version = "0.3.1", default-features = false }
 log = "0.4"
 pin-project = "0.4.17"
-once_cell = "1.3"
+once_cell = "1.4"
 bitflags = "1.2"
-smallvec = "1.0"
+smallvec = "1.4"
 parking_lot = "0.11"
 tokio = { version = "0.2.6", default-features = false, features = ["rt-core", "rt-util", "io-driver", "io-util", "tcp", "uds", "udp", "time", "signal", "sync"] }
 tokio-util = { version = "0.3", features = ["full"] }
diff --git a/LICENSE-APACHE b/LICENSE-APACHE
index 6cdf2d16c..8f5ba39b8 100644
--- a/LICENSE-APACHE
+++ b/LICENSE-APACHE
@@ -186,7 +186,7 @@
       same "printed page" as the copyright notice for easier
       identification within third-party archives.
 
-   Copyright 2017-NOW Nikolay Kim
+   Copyright 2017-NOW Actix Team
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
diff --git a/LICENSE-MIT b/LICENSE-MIT
index 410ce45a4..95938ef15 100644
--- a/LICENSE-MIT
+++ b/LICENSE-MIT
@@ -1,4 +1,4 @@
-Copyright (c) 2017 Nikilay Kim
+Copyright (c) 2017 Actix Team
 
 Permission is hereby granted, free of charge, to any
 person obtaining a copy of this software and associated
diff --git a/README.md b/README.md
index 5ca67c508..29e86a273 100644
--- a/README.md
+++ b/README.md
@@ -1,29 +1,42 @@
-# Actix [![codecov](https://codecov.io/gh/actix/actix/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix) [![crates.io](https://img.shields.io/crates/v/actix)](https://crates.io/crates/actix) [![Join the chat at https://gitter.im/actix/actix](https://badges.gitter.im/actix/actix.svg)](https://gitter.im/actix/actix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-Actix is a Rust actors framework.
-
-* [User Guide](https://actix.rs/book/actix/)
-* [API Documentation (Development)](https://actix.github.io/actix/actix/)
-* [API Documentation (Releases)](https://docs.rs/actix/)
-* Cargo package: [actix](https://crates.io/crates/actix)
-* Minimum supported Rust version: 1.40 or later
-
-| Platform | Build Status |
-| -------- | ------------ |
-| Linux | [![build status](https://github.com/actix/actix/workflows/CI%20%28Linux%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix/actions) |
-| macOS | [![build status](https://github.com/actix/actix/workflows/CI%20%28macOS%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix/actions) |
-| Windows | [![build status](https://github.com/actix/actix/workflows/CI%20%28Windows%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix/actions) |
+<div align="center">
+  <h1>Actix</h1>
+  <p>
+    <strong>Actor framework for Rust</strong>
+  </p>
+  <p>
+
+[![crates.io](https://meritbadge.herokuapp.com/actix)](https://crates.io/crates/actix)
+[![Documentation](https://docs.rs/actix/badge.svg)](https://docs.rs/actix)
+[![Version](https://img.shields.io/badge/rustc-1.40+-ab6000.svg)](https://blog.rust-lang.org/2019/12/19/Rust-1.40.0.html)
+<br />
+![License](https://img.shields.io/crates/l/actix.svg)
+[![codecov](https://codecov.io/gh/actix/actix/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix)
+[![Download](https://img.shields.io/crates/d/actix.svg)](https://crates.io/crates/actix)
+[![Join the chat at https://gitter.im/actix/actix](https://badges.gitter.im/actix/actix.svg)](https://gitter.im/actix/actix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+  </p>
+</div>
+
+- [User Guide](https://actix.rs/book/actix/)
+- [API Documentation](https://docs.rs/actix/)
+- [API Documentation (master branch)](https://actix.github.io/actix/actix/)
+
+| Platform | Build Status                                                                                                                                              |
+| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Linux    | [![build status](https://github.com/actix/actix/workflows/CI%20%28Linux%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix/actions)   |
+| macOS    | [![build status](https://github.com/actix/actix/workflows/CI%20%28macOS%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix/actions)   |
+| Windows  | [![build status](https://github.com/actix/actix/workflows/CI%20%28Windows%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix/actions) |
 
 ---
 
 ## Features
 
-  * Async/Sync actors.
-  * Actor communication in a local/thread context.
-  * Uses [Futures](https://crates.io/crates/futures) for asynchronous message handling.
-  * HTTP1/HTTP2 support ([actix-web](https://github.com/actix/actix-web))
-  * Actor supervision.
-  * Typed messages (No `Any` type).
+- Async and sync actors
+- Actor communication in a local/thread context
+- Uses [futures](https://crates.io/crates/futures) for asynchronous message handling
+- Actor supervision
+- Typed messages (No `Any` type)
+- Runs on stable Rust 1.40+
 
 ## Usage
 
@@ -31,7 +44,7 @@ To use `actix`, add this to your `Cargo.toml`:
 
 ```toml
 [dependencies]
-actix = "0.10.0-alpha.3"
+actix = "0.10"
 ```
 
 ### Initialize Actix
@@ -89,7 +102,7 @@ You can implement `started`, `stopping` and `stopped` methods of the Actor trait
 Check [API documentation](https://actix.github.io/actix/actix/trait.Actor.html#actor-lifecycle)
 for more information on the actor lifecycle.
 
-### Handle messages
+### Handle Messages
 
 An Actor communicates with another Actor by sending messages. In actix all messages
 are typed. Let's define a simple `Sum` message with two `usize` parameters,
@@ -137,7 +150,7 @@ All communications with actors go through an `Addr` object. You can `do_send` a
 without waiting for a response, or `send` an actor with specific message. The `Message`
 trait defines the result type for a message.
 
-### Actor state and subscription for specific messages
+### Actor State And Subscription For Specific Messages
 
 You may have noticed that methods of `Actor` and `Handler` traits accept `&mut self`, so you are
 welcome to store anything in an actor and mutate it whenever necessary.
@@ -179,7 +192,7 @@ impl Handler<Ping> for Game {
         } else {
             println!("[{0}] Ping received {1}", self.name, msg.id);
 
-            // wait 100 nanos
+            // wait 100 nanoseconds
             ctx.run_later(Duration::new(0, 100), move |act, _| {
                 act.addr.do_send(Ping { id: msg.id + 1 });
             });
@@ -217,17 +230,12 @@ fn main() {
 }
 ```
 
-### chat example
+### Chat Example
 
 There is a
 [chat example](https://github.com/actix/actix/tree/master/examples/chat)
 which provides a basic example of networking client/server service.
 
-### fectl
-
-You may consider checking out [fectl](https://github.com/fafhrd91/fectl) utility. It is written
-with `actix` and shows how to create networking application with relatively complex interactions.
-
 ## Contributing
 
 All contributions are welcome, if you have a feature request don't hesitate to open an issue!
@@ -236,15 +244,15 @@ All contributions are welcome, if you have a feature request don't hesitate to o
 
 This project is licensed under either of
 
- * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
-   https://www.apache.org/licenses/LICENSE-2.0)
- * MIT license ([LICENSE-MIT](LICENSE-MIT) or
-   https://opensource.org/licenses/MIT)
+- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
+  https://www.apache.org/licenses/LICENSE-2.0)
+- MIT license ([LICENSE-MIT](LICENSE-MIT) or
+  https://opensource.org/licenses/MIT)
 
 at your option.
 
 ## Code of Conduct
 
 Contribution to the actix crate is organized under the terms of the
-Contributor Covenant, the maintainer of actix, @fafhrd91, promises to
+Contributor Covenant, the maintainers of actix, promises to
 intervene to uphold that code of conduct.
diff --git a/examples/chat/README.md b/examples/chat/README.md
index 11e6c8a4b..025c8a4a8 100644
--- a/examples/chat/README.md
+++ b/examples/chat/README.md
@@ -3,7 +3,7 @@
 
 ## Server
 
-Chat server listens for incoming tcp connections. Server can access several types of message:
+Chat server listens for incoming TCP connections. Server can access several types of message:
 
   * `/list` - list all available rooms
   * `/join name` - join room, if room does not exist, create new one
diff --git a/examples/chat/src/main.rs b/examples/chat/src/main.rs
index 38a65d78d..c4887d869 100644
--- a/examples/chat/src/main.rs
+++ b/examples/chat/src/main.rs
@@ -15,7 +15,7 @@ use codec::ChatCodec;
 use server::ChatServer;
 use session::ChatSession;
 
-/// Define tcp server that will accept incoming tcp connection and create
+/// Define TCP server that will accept incoming TCP connection and create
 /// chat actors.
 struct Server {
     chat: Addr<ChatServer>,
diff --git a/examples/chat/src/session.rs b/examples/chat/src/session.rs
index b48c4e42b..9268813ba 100644
--- a/examples/chat/src/session.rs
+++ b/examples/chat/src/session.rs
@@ -1,4 +1,4 @@
-//! `ClientSession` is an actor, it manages peer tcp connection and
+//! `ClientSession` is an actor, it manages peer TCP connection and
 //! proxies commands from peer to `ChatServer`.
 use std::io;
 
@@ -16,7 +16,7 @@ use crate::server::{self, ChatServer};
 #[rtype(result = "()")]
 pub struct Message(pub String);
 
-/// `ChatSession` actor is responsible for tcp peer communications.
+/// `ChatSession` actor is responsible for TCP peer communications.
 pub struct ChatSession {
     /// unique session id
     id: usize,
diff --git a/src/fut/mod.rs b/src/fut/mod.rs
index 52d78bd75..79a55b16c 100644
--- a/src/fut/mod.rs
+++ b/src/fut/mod.rs
@@ -270,8 +270,7 @@ pub trait ActorStream {
 /// used in a very similar fashion.
 pub trait IntoActorFuture {
     /// The future that this type can be converted into.
-    #[rustfmt::skip]
-    type Future: ActorFuture<Output=Self::Output, Actor=Self::Actor>;
+    type Future: ActorFuture<Output = Self::Output, Actor = Self::Actor>;
 
     /// The item that the future may resolve with.
     type Output;
diff --git a/src/lib.rs b/src/lib.rs
index d92186502..f969cafd3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,6 +1,6 @@
-//! # Actix is a rust actors framework
+//! Actix is an actor framework.
 //!
-//! [Actors](https://actix.github.io/actix/actix/trait.Actor.html) are
+//! [Actors](./trait.Actor.html) are
 //! objects which encapsulate state and behavior, they communicate
 //! exclusively by exchanging messages. Actix actors are implemented
 //! on top of [Tokio](https://tokio.rs).  Multiple actors can run in
@@ -8,26 +8,23 @@
 //! [`Arbiter`](struct.Arbiter.html) API. Actors exchange typed
 //! messages.
 //!
-//! ## Documentation
+//! ## Other Documentation
 //!
-//! * [User Guide](https://actix.rs/book/actix/)
-//! * [Chat on gitter](https://gitter.im/actix/actix)
-//! * [GitHub repository](https://github.com/actix/actix)
-//! * [Cargo package](https://crates.io/crates/actix)
-//! * Minimum supported Rust version: 1.40 or later
+//! - [User Guide](https://actix.rs/book/actix/)
+//! - [Community Chat on Gitter](https://gitter.im/actix/actix)
 //!
 //! ## Features
 //!
-//! * Async/Sync actors.
-//! * Actor communication in a local/thread context.
-//! * Using Futures for asynchronous message handling.
-//! * HTTP1/HTTP2 support ([actix-web](https://github.com/actix/actix-web))
-//! * Actor supervision.
-//! * Typed messages (No `Any` type). Generic messages are allowed.
+//! - Async/Sync actors
+//! - Actor communication in a local/thread context
+//! - Using Futures for asynchronous message handling
+//! - Actor supervision
+//! - Typed messages (No `Any` type). Generic messages are allowed
+//! - Runs on stable Rust 1.40+
 //!
 //! ## Package feature
 //!
-//! * `resolver` - enables dns resolver actor, `actix::actors::resolver`
+//! * `resolver` - enables DNS resolver actor; see [resolver](./actors/resolver/index.html) module
 //!
 //! ## Tokio runtime
 //!
@@ -36,13 +33,14 @@
 //!
 //! While it provides minimum overhead, it has its own limits:
 //!
-//! - You cannot use tokio's async file I/O, as it relies on blocking calls that are not available
+//! - You cannot use Tokio's async file I/O, as it relies on blocking calls that are not available
 //! in `current_thread`
 //! - `Stdin`, `Stderr` and `Stdout` from `tokio::io` are the same as file I/O in that regard and
 //! cannot be used in asynchronous manner in actix.
 // It's pain for this crate and has false positives.
+
 #![allow(clippy::needless_doctest_main)]
-#![deny(bare_trait_objects, nonstandard_style, rust_2018_idioms, unused)]
+#![deny(nonstandard_style, rust_2018_idioms)]
 #![warn(deprecated_in_future, trivial_casts, trivial_numeric_casts)]
 
 #[doc(hidden)]
diff --git a/src/supervisor.rs b/src/supervisor.rs
index 9a23b9d2e..4d11bf44a 100644
--- a/src/supervisor.rs
+++ b/src/supervisor.rs
@@ -57,11 +57,12 @@ use crate::mailbox::DEFAULT_CAPACITY;
 /// }
 ///
 /// fn main() {
-///     System::run(|| {
-///         let addr = actix::Supervisor::start(|_| MyActor);
+///     let sys = System::new("example");
 ///
-///         addr.do_send(Die);
-///     });
+///     let addr = actix::Supervisor::start(|_| MyActor);
+///     addr.do_send(Die);
+///
+///     sys.run();
 /// }
 /// ```
 #[pin_project]


Test patch:
diff --git a/tests/derive.rs b/tests/derive.rs
index 9eeb1b7f7..9f80ac8bf 100644
--- a/tests/derive.rs
+++ b/tests/derive.rs
@@ -1,7 +1,6 @@
 use std::ops::Mul;
 
 use actix::prelude::*;
-use actix_derive::{Message, MessageResponse};
 
 #[derive(Message)]
 #[rtype(result = "()")]