aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Schilling <erik.schilling@linaro.org>2023-09-28 08:23:19 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-09-29 14:33:49 +0200
commit27afa47fcbb5905ada95e1e7b8ab9faba9ba9c0c (patch)
tree654566ecc2176d2df9581ec6779016968460e8eb
parentced90e79217793957b11414f47f8aa8a77c7a2d5 (diff)
downloadlibgpiod-27afa47fcbb5905ada95e1e7b8ab9faba9ba9c0c.tar.gz
bindings: rust: remove useless clone
Reported by 1.74.0-nightly: warning: call to `.clone()` on a reference in this situation does nothing --> libgpiod/tests/line_request.rs:71:44 | 71 | let chip_name = sim.chip_name().clone(); | ^^^^^^^^ help: remove this redundant call | = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed = note: `#[warn(noop_method_call)]` on by default Signed-off-by: Erik Schilling <erik.schilling@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-rw-r--r--bindings/rust/libgpiod/tests/line_request.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/bindings/rust/libgpiod/tests/line_request.rs b/bindings/rust/libgpiod/tests/line_request.rs
index 9af52268..da22bea2 100644
--- a/bindings/rust/libgpiod/tests/line_request.rs
+++ b/bindings/rust/libgpiod/tests/line_request.rs
@@ -68,7 +68,7 @@ mod line_request {
let arc = config.sim();
let sim = arc.lock().unwrap();
- let chip_name = sim.chip_name().clone();
+ let chip_name = sim.chip_name();
assert_eq!(config.request().chip_name().unwrap(), chip_name);
}