virtio-devices: vsock: Fix clippy issue in tests

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-10-19 16:18:25 +01:00 committed by Bo Chen
parent 05c79119b9
commit cf86ca15c2

View File

@ -972,7 +972,7 @@ mod tests {
} }
impl LocalListener { impl LocalListener {
fn new<P: AsRef<Path> + Clone>(path: P) -> Self { fn new<P: AsRef<Path> + Clone>(path: P) -> Self {
let path_buf = path.clone().as_ref().to_path_buf(); let path_buf = path.as_ref().to_path_buf();
let sock = UnixListener::bind(path).unwrap(); let sock = UnixListener::bind(path).unwrap();
sock.set_nonblocking(true).unwrap(); sock.set_nonblocking(true).unwrap();
Self { Self {