Commit 985bbbb
authored
fix new 1.81.0 warning and clippy error (#760)
* fix new 1.81.0 warning and clippy error
on 1.81, this expression caused rustc warning, and clippy error:
```
warning: this function depends on never type fallback being `()`
--> bin/propolis-cli/src/main.rs:497:1
|
497 | / async fn migrate_instance(
498 | | src_client: Client,
499 | | dst_client: Client,
500 | | src_addr: SocketAddr,
501 | | dst_uuid: Uuid,
502 | | disks: Vec<DiskRequest>,
503 | | ) -> anyhow::Result<()> {
| |_______________________^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #123748 <rust-lang/rust#123748>
= help: specify the types explicitly
note: in edition 2024, the requirement `!: FromIterator<()>` will fail
--> bin/propolis-cli/src/main.rs:598:20
|
598 | .collect::<anyhow::Result<_>>()?;
| ^^^^^^^^^^^^^^^^^
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
warning: `propolis-cli` (bin "propolis-cli") generated 1 warning
```
i am, honestly, entirely missing how the never type is involved here, or how
changing the `collect`'s type from `anyhow::Result<_>` to `anyhow::Result<()>`
changes things in a direction to satisfy rustc. but bounding the type further
doesn't seem like it would cause a problem?
* the unused pub(crate) struct warnings are new also, allow these cases1 parent 3c38946 commit 985bbbb
File tree
3 files changed
+22
-12
lines changed- bin
- propolis-cli/src
- propolis-utils/src/bin
- lib/propolis/src/firmware/smbios
3 files changed
+22
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
| 598 | + | |
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| 147 | + | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| |||
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| 168 | + | |
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
| |||
0 commit comments