Closed
Description
The problem is as following.
When I run cargo fmt --all
, it should modify all the files that do not follow the format standard. But after I running cargo fmt --all -- --check
, it still tells me one file does not have the correct format.
root@d115673865b5:~/cita# cargo fmt --all
root@d115673865b5:~/cita# cargo fmt --all -- --check
Diff in /root/cita/tools/relayer-parser/src/communication.rs at line 126:
define_reply_type!(ReplyType, $result_type);
let rpc_cli = RpcClient::new($upstream);
let body: String = json!({
- "jsonrpc": "2.0",
- "method": $method,
- "params": json!($params),
- "id": 1
- }).to_string();
+ "jsonrpc": "2.0",
+ "method": $method,
+ "params": json!($params),
+ "id": 1
+ }).to_string();
let data = rpc_cli.do_post(&body)?;
let reply: ReplyType = serde_json::from_slice(&data).map_err(|_| {
error!(
Rustfmt version is nightly-2018-05-17
System is Ubuntu 18.04