diff --git a/.github/workflows/cargo-test.yml b/.github/workflows/cargo-test.yml index c17ab82314..4bceb086fd 100644 --- a/.github/workflows/cargo-test.yml +++ b/.github/workflows/cargo-test.yml @@ -12,7 +12,7 @@ jobs: fetch-depth: 1 - uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2019-11-06 + toolchain: nightly-2019-12-19 components: clippy profile: minimal override: true @@ -28,7 +28,7 @@ jobs: fetch-depth: 1 - uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2019-11-06 + toolchain: nightly-2019-12-19 components: rustfmt profile: minimal override: true diff --git a/README.md b/README.md index 54b4895f38..412fbd062d 100644 --- a/README.md +++ b/README.md @@ -132,35 +132,35 @@ You can create a block by sending a transaction through [JSON-RPC](https://githu ## Formatting -Make sure you run `rustfmt` before creating a PR to the repo. You need to install the nightly-2019-11-06 version of `rustfmt`. +Make sure you run `rustfmt` before creating a PR to the repo. You need to install the nightly-2019-12-19 version of `rustfmt`. ```sh -rustup toolchain install nightly-2019-11-06 -rustup component add rustfmt --toolchain nightly-2019-11-06 +rustup toolchain install nightly-2019-12-19 +rustup component add rustfmt --toolchain nightly-2019-12-19 ``` To run `rustfmt`, ```sh -cargo +nightly-2019-11-06 fmt +cargo +nightly-2019-12-19 fmt ``` ## Linting You should run `clippy` also. This is a lint tool for rust. It suggests more efficient/readable code. You can see [the clippy document](https://rust-lang.github.io/rust-clippy/master/index.html) for more information. -You need to install the nightly-2019-11-06 version of `clippy`. +You need to install the nightly-2019-12-19 version of `clippy`. ### Install ```sh -rustup toolchain install nightly-2019-11-06 -rustup component add clippy --toolchain nightly-2019-11-06 +rustup toolchain install nightly-2019-12-19 +rustup component add clippy --toolchain nightly-2019-12-19 ``` ### Run ```sh -cargo +nightly-2019-11-06 clippy --all --all-targets +cargo +nightly-2019-12-19 clippy --all --all-targets ``` ## Testing diff --git a/util/io/src/lib.rs b/util/io/src/lib.rs index 8f620b3b33..83584f1f50 100644 --- a/util/io/src/lib.rs +++ b/util/io/src/lib.rs @@ -27,33 +27,33 @@ //! struct MyHandler; //! //! struct MyMessage { -//! data: u32 +//! data: u32 //! } //! //! impl IoHandler for MyHandler { -//! fn initialize(&self, io: &IoContext) -> IoHandlerResult<()> { -//! io.register_timer(0, Duration::from_secs(1)); -//! Ok(()) -//! } +//! fn initialize(&self, io: &IoContext) -> IoHandlerResult<()> { +//! io.register_timer(0, Duration::from_secs(1)); +//! Ok(()) +//! } //! -//! fn timeout(&self, _io: &IoContext, timer: TimerToken) -> IoHandlerResult<()> { -//! println!("Timeout {}", timer); -//! Ok(()) -//! } +//! fn timeout(&self, _io: &IoContext, timer: TimerToken) -> IoHandlerResult<()> { +//! println!("Timeout {}", timer); +//! Ok(()) +//! } //! -//! fn message(&self, _io: &IoContext, message: MyMessage) -> IoHandlerResult<()> { -//! println!("Message {}", message.data); -//! Ok(()) -//! } +//! fn message(&self, _io: &IoContext, message: MyMessage) -> IoHandlerResult<()> { +//! println!("Message {}", message.data); +//! Ok(()) +//! } //! } //! -//! fn main () { -//! let mut service = IoService::::start("Test").expect("Error creating network service"); -//! service.register_handler(Arc::new(MyHandler)).unwrap(); +//! fn main () { +//! let mut service = IoService::::start("Test").expect("Error creating network service"); +//! service.register_handler(Arc::new(MyHandler)).unwrap(); //! -//! // Wait for quit condition -//! // ... -//! // Drop the service +//! // Wait for quit condition +//! // ... +//! // Drop the service //! } //! ```