Commit 18e0839
authored
* Make `metal` dependency rely on the `metal` feature
We seem to have this weird case where the `metal` crate is always
included (on supported target OSes), even if the non-default `metal`
feature isn't turned on. Found this while wondering why `cargo` wasn't
complaining about a clash thanks to the implicit feature created by an
optional crate with an identically-named feature in the `[features]`
table without [the `dep:` rename prefix], turns out that the `metal`
crate wasn't `optional = true` in the first place. Fix that.
[the `dep:` rename prefix]: https://doc.rust-lang.org/cargo/reference/features.html#optional-dependencies
* Remove unnecessary `map_or()` (could also have been a `map()` or `inspect()`)
Our MSRV is still at 1.65 otherwise we could use https://doc.rust-lang.org/std/option/enum.Option.html#method.inspect from Rust 1.76.
* metal: Clean up repetitive import
1 parent 0b5d2cf commit 18e0839
4 files changed
+37
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
| |||
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
48 | 43 | | |
49 | 44 | | |
50 | 45 | | |
51 | 46 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
61 | 53 | | |
62 | 54 | | |
63 | 55 | | |
64 | 56 | | |
65 | 57 | | |
66 | 58 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
76 | 65 | | |
77 | 66 | | |
78 | 67 | | |
| |||
115 | 104 | | |
116 | 105 | | |
117 | 106 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
122 | 111 | | |
123 | 112 | | |
124 | 113 | | |
| |||
203 | 192 | | |
204 | 193 | | |
205 | 194 | | |
206 | | - | |
| 195 | + | |
207 | 196 | | |
208 | | - | |
| 197 | + | |
| 198 | + | |
209 | 199 | | |
210 | 200 | | |
211 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
| 462 | + | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
0 commit comments