Skip to content

Commit 194e71f

Browse files
SeungMin Leemajecty
authored andcommitted
Upgrade rust toolchains
Currently, Codechain uses the clippy(+nightly-2019-11-06) and the rustfmt(+nightly-2019-11-06). We need to make codechain use the latest toolchains. I upgraded the clippy to `+nightly-2019-12-19` and the rustfmt to `+nigtly-2019-12-19`. Fixed #1937
1 parent 360c140 commit 194e71f

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

.github/workflows/cargo-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
fetch-depth: 1
1313
- uses: actions-rs/toolchain@v1
1414
with:
15-
toolchain: nightly-2019-11-06
15+
toolchain: nightly-2019-12-19
1616
components: clippy
1717
profile: minimal
1818
override: true
@@ -28,7 +28,7 @@ jobs:
2828
fetch-depth: 1
2929
- uses: actions-rs/toolchain@v1
3030
with:
31-
toolchain: nightly-2019-11-06
31+
toolchain: nightly-2019-12-19
3232
components: rustfmt
3333
profile: minimal
3434
override: true

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,35 +132,35 @@ You can create a block by sending a transaction through [JSON-RPC](https://githu
132132
## Formatting
133133
134134
135-
Make sure you run `rustfmt` before creating a PR to the repo. You need to install the nightly-2019-11-06 version of `rustfmt`.
135+
Make sure you run `rustfmt` before creating a PR to the repo. You need to install the nightly-2019-12-19 version of `rustfmt`.
136136
137137
```sh
138-
rustup toolchain install nightly-2019-11-06
139-
rustup component add rustfmt --toolchain nightly-2019-11-06
138+
rustup toolchain install nightly-2019-12-19
139+
rustup component add rustfmt --toolchain nightly-2019-12-19
140140
```
141141
142142
To run `rustfmt`,
143143
144144
```sh
145-
cargo +nightly-2019-11-06 fmt
145+
cargo +nightly-2019-12-19 fmt
146146
```
147147
148148
## Linting
149149
150150
You should run `clippy` also. This is a lint tool for rust. It suggests more efficient/readable code.
151151
You can see [the clippy document](https://rust-lang.github.io/rust-clippy/master/index.html) for more information.
152-
You need to install the nightly-2019-11-06 version of `clippy`.
152+
You need to install the nightly-2019-12-19 version of `clippy`.
153153
154154
### Install
155155
```sh
156-
rustup toolchain install nightly-2019-11-06
157-
rustup component add clippy --toolchain nightly-2019-11-06
156+
rustup toolchain install nightly-2019-12-19
157+
rustup component add clippy --toolchain nightly-2019-12-19
158158
```
159159
160160
### Run
161161
162162
```sh
163-
cargo +nightly-2019-11-06 clippy --all --all-targets
163+
cargo +nightly-2019-12-19 clippy --all --all-targets
164164
```
165165
166166
## Testing

util/io/src/lib.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,33 @@
2727
//! struct MyHandler;
2828
//!
2929
//! struct MyMessage {
30-
//! data: u32
30+
//! data: u32
3131
//! }
3232
//!
3333
//! impl IoHandler<MyMessage> for MyHandler {
34-
//! fn initialize(&self, io: &IoContext<MyMessage>) -> IoHandlerResult<()> {
35-
//! io.register_timer(0, Duration::from_secs(1));
36-
//! Ok(())
37-
//! }
34+
//! fn initialize(&self, io: &IoContext<MyMessage>) -> IoHandlerResult<()> {
35+
//! io.register_timer(0, Duration::from_secs(1));
36+
//! Ok(())
37+
//! }
3838
//!
39-
//! fn timeout(&self, _io: &IoContext<MyMessage>, timer: TimerToken) -> IoHandlerResult<()> {
40-
//! println!("Timeout {}", timer);
41-
//! Ok(())
42-
//! }
39+
//! fn timeout(&self, _io: &IoContext<MyMessage>, timer: TimerToken) -> IoHandlerResult<()> {
40+
//! println!("Timeout {}", timer);
41+
//! Ok(())
42+
//! }
4343
//!
44-
//! fn message(&self, _io: &IoContext<MyMessage>, message: MyMessage) -> IoHandlerResult<()> {
45-
//! println!("Message {}", message.data);
46-
//! Ok(())
47-
//! }
44+
//! fn message(&self, _io: &IoContext<MyMessage>, message: MyMessage) -> IoHandlerResult<()> {
45+
//! println!("Message {}", message.data);
46+
//! Ok(())
47+
//! }
4848
//! }
4949
//!
50-
//! fn main () {
51-
//! let mut service = IoService::<MyMessage>::start("Test").expect("Error creating network service");
52-
//! service.register_handler(Arc::new(MyHandler)).unwrap();
50+
//! fn main () {
51+
//! let mut service = IoService::<MyMessage>::start("Test").expect("Error creating network service");
52+
//! service.register_handler(Arc::new(MyHandler)).unwrap();
5353
//!
54-
//! // Wait for quit condition
55-
//! // ...
56-
//! // Drop the service
54+
//! // Wait for quit condition
55+
//! // ...
56+
//! // Drop the service
5757
//! }
5858
//! ```
5959

0 commit comments

Comments
 (0)