From 64cd5eae5778b86f6e498a6fa1b1962693aa5a46 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 15 Apr 2019 15:56:35 -0700 Subject: edition: Eliminate ref keyword As described in: https://doc.rust-lang.org/edition-guide/rust-2018/ownership-and-lifetimes/default-match-bindings.html which also covers the new mental model that the Rust Book will use for teaching binding modes and has been found to be more friendly for both beginners and experienced users. Before: match *opt { Some(ref v) => ..., None => ..., } After: match opt { Some(v) => ..., None => ..., } TEST=cargo check --all-features TEST=local kokoro Change-Id: I3c5800a9be36aaf5d3290ae3bd3116f699cb00b7 Reviewed-on: https://chromium-review.googlesource.com/1566669 Commit-Ready: David Tolnay Tested-by: David Tolnay Tested-by: kokoro Reviewed-by: Daniel Verkamp --- net_util/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net_util/src') diff --git a/net_util/src/lib.rs b/net_util/src/lib.rs index 591fa99..4122b05 100644 --- a/net_util/src/lib.rs +++ b/net_util/src/lib.rs @@ -671,7 +671,7 @@ mod tests { match res { // We won't have permission in test environments; allow that Ok(_t) => {} - Err(Error::IoctlError(ref e)) if e.errno() == EPERM => {} + Err(Error::IoctlError(e)) if e.errno() == EPERM => {} Err(e) => panic!("Unexpected Error:\n{}", e), } } -- cgit 1.4.1