mirror of
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
synced 2026-10-24 00:48:53 +03:00
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>
This commit is contained in:
committed by
Bartosz Golaszewski
parent
ced90e7921
commit
27afa47fcb
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user