New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
await
triggers blocks_in_conditions
#12016
Comments
cc @J-ZhengLi Is this possibile to be caused by #11853? |
Sadly yes... Hmmm, weird, I'm sure I was specifically targeting match expressions with |
@xxchan I can't reproduce the issue, nvm, found it in your repo |
@rustbot label I-suggestion-causes-error |
I have issue with this also when running clippy on the Vaultwarden code base. It generates warning like this, which makes no sense at all.
|
Since this is going to be released in the upcoming Rust 1.76, i have to allow this lint for now i think. |
I think I'm also hitting this, the repository is not public but the source and warnings look like this: #[instrument(name = "Database::list_foo_bars", skip(self), err)]
async fn list_foo_bars(&self) -> anyhow::Result<Vec<Uuid>> {
let bars: Vec<Uuid> =
sqlx::query("SELECT id FROM foo WHERE is_bar = true")
.map::<_, Uuid>(|ref row: PgRow| row.get(0))
.fetch_all(&self.pool)
.await?;
Ok(bars)
} That results in:
|
@lucab + @tmbernardo I've opened a new issue #12281 as this clutters our codebase too |
Summary
Lint Name
blocks_in_conditions
Reproducer
I tried this code:
<code>
I saw this happen:
I expected to see this happen:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: