Replies: 1 comment
-
Hi, so this is quite a tricky question to answer generally. I wouldn't be that against just adding an However, depending on your use case there might be something better you can do: it seems like you're using cynic in your tests - could you assert on the values that you're getting back from your tests somehow? Either a manual assert on the fields that clippy thinks are unused, or maybe something more sophisticated like a snapshot test with insta? That might be enough for clippy to see that the fields of the struct are actually used. |
Beta Was this translation helpful? Give feedback.
-
Hi, 👋🏽
I am using
cynic
to test my API. The structure looks like this.Let's say I wanted to test my
meta
endpoint. I haveThe
graphql.rs
contains cynic definition.It is used in my code, but clippy doesn't say so.
Do you have any suggestion to tame clippy? I don't think using
#[warn(dead_code)]
is wise enough.Thanks for Cynic 🍩
Beta Was this translation helpful? Give feedback.
All reactions