mirror of
https://github.com/rust-lang/rust
synced 2024-09-15 22:50:55 +00:00
Rollup merge of #58835 - Centril:rust_2018_idioms-remote-test, r=oli-obk
tools/remote-test-{client,server}: deny(rust_2018_idioms) r? @oli-obk (+ tiny amount of cleanup)
This commit is contained in:
commit
0404c83626
|
@ -1,3 +1,5 @@
|
||||||
|
#![deny(rust_2018_idioms)]
|
||||||
|
|
||||||
/// This is a small client program intended to pair with `remote-test-server` in
|
/// This is a small client program intended to pair with `remote-test-server` in
|
||||||
/// this repository. This client connects to the server over TCP and is used to
|
/// this repository. This client connects to the server over TCP and is used to
|
||||||
/// push artifacts and run tests on the server instead of locally.
|
/// push artifacts and run tests on the server instead of locally.
|
||||||
|
@ -15,7 +17,7 @@
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
const REMOTE_ADDR_ENV: &'static str = "TEST_DEVICE_ADDR";
|
const REMOTE_ADDR_ENV: &str = "TEST_DEVICE_ADDR";
|
||||||
|
|
||||||
macro_rules! t {
|
macro_rules! t {
|
||||||
($e:expr) => (match $e {
|
($e:expr) => (match $e {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![deny(rust_2018_idioms)]
|
||||||
|
|
||||||
/// This is a small server which is intended to run inside of an emulator or
|
/// This is a small server which is intended to run inside of an emulator or
|
||||||
/// on a remote test device. This server pairs with the `remote-test-client`
|
/// on a remote test device. This server pairs with the `remote-test-client`
|
||||||
/// program in this repository. The `remote-test-client` connects to this
|
/// program in this repository. The `remote-test-client` connects to this
|
||||||
|
@ -120,7 +122,7 @@ struct RemoveOnDrop<'a> {
|
||||||
inner: &'a Path,
|
inner: &'a Path,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Drop for RemoveOnDrop<'a> {
|
impl Drop for RemoveOnDrop<'_> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
t!(fs::remove_dir_all(self.inner));
|
t!(fs::remove_dir_all(self.inner));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue