mirror of
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
synced 2026-10-24 00:48:53 +03:00
bindings: rust: clippy: drop unneeded conversions
Fixes clippy warnings on these lines.
Applied the suggested fix using:
cargo clippy --fix
clippy version: clippy 0.1.70 (90c5418 2023-05-31).
Reported-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20230612154055.56556-1-warthog618@gmail.com
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
committed by
Bartosz Golaszewski
parent
46115fddd7
commit
39189f0bf5
@@ -186,7 +186,7 @@ impl SimBank {
|
||||
|
||||
fn set_num_lines(&self, num: usize) -> Result<()> {
|
||||
// SAFETY: `gpiosim_bank` is guaranteed to be valid here.
|
||||
let ret = unsafe { gpiosim_bank_set_num_lines(self.bank, num.try_into().unwrap()) };
|
||||
let ret = unsafe { gpiosim_bank_set_num_lines(self.bank, num) };
|
||||
if ret == -1 {
|
||||
Err(Error::OperationFailed(
|
||||
OperationType::SimBankSetNumLines,
|
||||
|
||||
@@ -108,7 +108,7 @@ impl Buffer {
|
||||
gpiod::gpiod_line_request_read_edge_events(
|
||||
request.request,
|
||||
self.buffer,
|
||||
self.events.len().try_into().unwrap(),
|
||||
self.events.len(),
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user