Commit 5b3b8c5
committed
chore: clippy + fmt cleanup
Drives the tree to a `cargo clippy --all-targets -- -D warnings`-clean
and `cargo fmt --check`-clean state for the v0.4.0 release.
Clippy fixes:
- Drop unused symbols: `OrderBlock::is_our_order_mask`/`_pad`,
`GlobalOrderPool::reset`, `QueuePtrs::total_qty`, `WINDOW_MASK`,
`QTY_EPSILON_U64`, `KMeans::batch_indices`,
`BufferedTrade::{price_ticks, is_buyer_maker}`, the `x86_64::*` and
`Trade` imports, and the `Duration` import in benches.
- Mark `AppMessage::{SpotApiKeyRequired, NetworkWarning}` `symbol`/
`market` fields with `#[allow(dead_code)]` (intentional API metadata
the UI does not currently surface).
- Add `Default` for `Bitset`, derive `Default` on `TwapView`, add the
`# Safety` doc to `remove_order_by_size_simd`, switch
`i64::abs() as usize` to `unsigned_abs()`, and replace
`map_or(true|false, …)` with `is_none_or` / `is_some_and`.
- Use `is_multiple_of(50)` instead of `% 50 == 0`, type-annotate the
`2.0_f32` literal in twap_view, and rewrite the centroid-order
initialisation as `iter_mut().take(k).enumerate()`.
- Collapse 7 nested `if … { if … }` blocks across `client.rs`,
`app.rs`, `heatmap.rs`, `kmeans.rs`, `order_book.rs` into combined
`if … && let … && …` forms.
- `#[allow(clippy::field_reassign_with_default)]` on the order_book
test module (those tests deliberately mutate fields after `default()`
to bypass the snapshot path).
Plus a full `cargo fmt` pass (whitespace, import ordering, multi-line
expression formatting). 13 lib tests still pass.1 parent 3ca885e commit 5b3b8c5
19 files changed
Lines changed: 522 additions & 274 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
67 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
71 | 82 | | |
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
75 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
76 | 91 | | |
77 | 92 | | |
78 | 93 | | |
| |||
83 | 98 | | |
84 | 99 | | |
85 | 100 | | |
86 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
87 | 106 | | |
88 | 107 | | |
89 | 108 | | |
| |||
92 | 111 | | |
93 | 112 | | |
94 | 113 | | |
95 | | - | |
96 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
97 | 126 | | |
98 | | - | |
99 | | - | |
100 | 127 | | |
101 | 128 | | |
102 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
103 | 133 | | |
104 | 134 | | |
105 | 135 | | |
106 | 136 | | |
107 | 137 | | |
108 | 138 | | |
109 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
110 | 143 | | |
111 | 144 | | |
112 | 145 | | |
| |||
115 | 148 | | |
116 | 149 | | |
117 | 150 | | |
118 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
119 | 156 | | |
120 | 157 | | |
121 | 158 | | |
122 | 159 | | |
123 | 160 | | |
124 | | - | |
125 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
126 | 169 | | |
127 | 170 | | |
128 | | - | |
129 | | - | |
130 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
131 | 180 | | |
132 | 181 | | |
133 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments