scripts: Check the Rust formatting is valid

Check the rust formatting rather than just reformatting code on the CI
agent.

Also fix a formatting error that slipped in whilst the cargo fmt check
was not working correctly.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-02-04 14:52:25 +00:00 committed by Samuel Ortiz
parent 705f27151d
commit 6e6b2b84fe
2 changed files with 3 additions and 2 deletions

View File

@ -24,5 +24,5 @@ time cargo rustc --bin vhost_user_net --no-default-features --features "pci" --
time cargo clippy --all-targets --no-default-features --features "mmio" -- -D warnings
time cargo rustc --bin cloud-hypervisor --no-default-features --features "mmio" -- -D warnings
time cargo rustc --bin vhost_user_net --no-default-features --features "mmio" -- -D warnings
time cargo fmt
time cargo fmt -- --check
time cargo build --release

View File

@ -57,7 +57,8 @@ impl log::Log for Logger {
record.target(),
record.args()
)
}.ok();
}
.ok();
}
fn flush(&self) {}
}