From: Kent Gibson <warthog618@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Vincent Guittot" <vincent.guittot@linaro.org>,
linux-gpio@vger.kernel.org,
"Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
stratos-dev@op-lists.linaro.org,
"Gerard Ryan" <g.m0n3y.2503@gmail.com>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
y86-dev <y86-dev@protonmail.com>
Subject: Re: [libgpiod v2][PATCH V8 7/9] bindings: rust: Add tests for libgpiod crate
Date: Wed, 2 Nov 2022 21:15:13 +0800 [thread overview]
Message-ID: <Y2JtYTCqYM2sTuRC@sol> (raw)
In-Reply-To: <0e1deffab733e0a8458d1626bc20cd496cbd5099.1667215380.git.viresh.kumar@linaro.org>
On Mon, Oct 31, 2022 at 05:17:15PM +0530, Viresh Kumar wrote:
> Add tests for the rust bindings, quite similar to the ones in cxx
> bindings.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
$ cargo clippy --tests
Checking libgpiod v0.1.0 (/home/kent/work/libgpiod/bindings/rust/libgpiod)
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
--> libgpiod/tests/edge_event.rs:103:13
|
103 | drop(event);
| ^^^^^^^^^^^
|
= note: `#[deny(clippy::drop_ref)]` on by default
note: argument has type `&libgpiod::request::Event`
--> libgpiod/tests/edge_event.rs:103:18
|
103 | drop(event);
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drop_ref
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
--> libgpiod/tests/edge_event.rs:218:13
|
218 | drop(event);
| ^^^^^^^^^^^
|
note: argument has type `&libgpiod::request::Event`
--> libgpiod/tests/edge_event.rs:218:18
|
218 | drop(event);
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drop_ref
error: could not compile `libgpiod` due to 2 previous errors
Those drops are now redundant as the events are returned by ref after
patch 9.
I assume they are ignored in the build, as the tests build and run,
but clippy complains.
Cheers,
Kent.
next prev parent reply other threads:[~2022-11-02 13:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 11:47 [libgpiod v2][PATCH V8 0/9] bindings: rust: Add libgpiod-sys rust crate Viresh Kumar
2022-10-31 11:47 ` [libgpiod v2][PATCH V8 1/9] " Viresh Kumar
2022-10-31 11:47 ` [libgpiod v2][PATCH V8 2/9] bindings: rust: Add pre generated bindings for libgpiod-sys Viresh Kumar
2022-10-31 11:47 ` [libgpiod v2][PATCH V8 3/9] bindings: rust: Add gpiosim crate Viresh Kumar
2022-10-31 11:47 ` [libgpiod v2][PATCH V8 4/9] bindings: rust: Add pre generated bindings for gpiosim Viresh Kumar
2022-10-31 11:47 ` [libgpiod v2][PATCH V8 5/9] bindings: rust: Add libgpiod crate Viresh Kumar
2022-11-02 13:14 ` Kent Gibson
2022-11-04 5:57 ` Viresh Kumar
2022-10-31 11:47 ` [libgpiod v2][PATCH V8 6/9] bindings: rust: Add examples to " Viresh Kumar
2022-10-31 11:47 ` [libgpiod v2][PATCH V8 7/9] bindings: rust: Add tests for " Viresh Kumar
2022-11-02 13:15 ` Kent Gibson [this message]
2022-11-04 5:52 ` Viresh Kumar
2022-10-31 11:47 ` [libgpiod v2][PATCH V8 8/9] bindings: rust: Integrate building of bindings with make Viresh Kumar
2022-10-31 11:47 ` [libgpiod v2][PATCH V8 9/9] bindings: rust: Implement iterator for edge events Viresh Kumar
2022-11-02 13:16 ` Kent Gibson
2022-11-04 11:31 ` Viresh Kumar
2022-11-04 12:33 ` Kent Gibson
2022-11-05 1:20 ` Kent Gibson
2022-11-07 6:13 ` Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2JtYTCqYM2sTuRC@sol \
--to=warthog618@gmail.com \
--cc=alex.bennee@linaro.org \
--cc=alex.gaynor@gmail.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=brgl@bgdev.pl \
--cc=g.m0n3y.2503@gmail.com \
--cc=gary@garyguo.net \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=stratos-dev@op-lists.linaro.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=wedsonaf@gmail.com \
--cc=y86-dev@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.