Commit 28384f3
committed
Replace
Eliminates unnecessary casting between rusqlite's `i64` and our `u64` types.
Since rusqlite consistently uses `i64` for all integer operations, aligning
our types reduces friction and improves code clarity.
Changes:
- Change `RowId` inner type from `u64` to `i64`
- Remove casting in `RowId`'s `ToSql`, `FromSql`, and conversion implementations
- Update migration functions to use `i64` instead of `u64`
- Change `FetchResult.total_items` from `Option<u64>` to `Option<i64>`
- Remove unnecessary casts in repository and service code
- Update type casts in test code and helper functionsu64 with i64 in wp_mobile_cache and wp_mobile crates1 parent bc05ec2 commit 28384f3
File tree
6 files changed
+22
-23
lines changed- wp_mobile_cache/src
- repository
- wp_mobile/src
- collection
- service
6 files changed
+22
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | 118 | | |
120 | | - | |
| 119 | + | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | | - | |
| 123 | + | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
132 | | - | |
| 131 | + | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
140 | | - | |
| 139 | + | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
| |||
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
167 | | - | |
| 166 | + | |
168 | 167 | | |
169 | 168 | | |
170 | 169 | | |
| |||
247 | 246 | | |
248 | 247 | | |
249 | 248 | | |
250 | | - | |
| 249 | + | |
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
| |||
379 | 378 | | |
380 | 379 | | |
381 | 380 | | |
382 | | - | |
| 381 | + | |
383 | 382 | | |
384 | 383 | | |
385 | 384 | | |
| |||
394 | 393 | | |
395 | 394 | | |
396 | 395 | | |
397 | | - | |
| 396 | + | |
398 | 397 | | |
399 | 398 | | |
400 | | - | |
| 399 | + | |
401 | 400 | | |
402 | 401 | | |
403 | 402 | | |
| |||
408 | 407 | | |
409 | 408 | | |
410 | 409 | | |
411 | | - | |
| 410 | + | |
412 | 411 | | |
413 | 412 | | |
414 | 413 | | |
| |||
508 | 507 | | |
509 | 508 | | |
510 | 509 | | |
511 | | - | |
512 | | - | |
| 510 | + | |
| 511 | + | |
513 | 512 | | |
514 | 513 | | |
515 | 514 | | |
516 | 515 | | |
517 | 516 | | |
518 | | - | |
| 517 | + | |
519 | 518 | | |
520 | 519 | | |
521 | 520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
699 | | - | |
| 699 | + | |
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | | - | |
| 832 | + | |
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
933 | | - | |
| 933 | + | |
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
0 commit comments