Files
rust/tests/ui
bors b85f632607 Auto merge of #13528 - zvavybir:master, r=Alexendoo
Improved wording of or_fun_call lint

The current wording (e.g. ``use of `ok_or` followed by a function call``) is potentially confusing (at least it confused me) by suggesting that the function that follows the (in this case) `ok_or` is the problem and not the function that is an argument to it.

The code in my program that triggered the confusing message is the following:
```rust
let file_id = buf
    .lines()
    .next()
    .ok_or((
        InternalError::ProblemReadingFromInbox,
        anyhow!("No first line in inbox response ({file:?}): {buf:?}"),
    ))
    .html_context(stream, lang)?;
```
I thought that `html_context` was the problem and that I should do something along the following lines:
```rust
let file_id = buf
    .lines()
    .next()
    .ok_or_else(
        (
            InternalError::ProblemReadingFromInbox,
            anyhow!("No first line in inbox response ({file:?}): {buf:?}"),
        ),
        html_context(stream, lang),
    )?
```
This is of course wrong.  My confusion was only cleared up through the help message indicating what I should try instead.

If someone has a better idea of a replacement wording (currently e.g. ``` function call inside of `ok_or` ```), I'm all ears.

changelog: none
2024-10-11 15:01:07 +00:00
..
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-04-24 13:12:33 +01:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-05-08 21:37:55 +02:00
2024-05-08 21:37:55 +02:00
2024-05-08 21:37:55 +02:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:48:15 -04:00
2024-04-27 10:54:35 +03:00
2024-07-04 22:31:53 +02:00
2024-07-04 21:27:52 +02:00
2024-07-04 22:31:53 +02:00
2023-09-23 13:47:30 +00:00
2024-04-27 10:54:35 +03:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-04-24 13:12:33 +01:00
2024-06-13 12:24:31 +02:00
2024-06-13 12:24:31 +02:00
2024-09-25 13:52:12 -04:00
2024-04-24 13:12:33 +01:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-25 13:52:12 -04:00
2024-09-01 12:38:59 +02:00
2024-06-09 07:47:42 +01:00
2023-10-04 21:09:54 +00:00
2024-09-25 13:52:12 -04:00