Commit 5c40af9
committed
rust: transmute: simplify code with Rust 1.80.0
`feature(split_at_checked)` [1] has been stabilized in Rust 1.80.0 [2],
which is older than our new minimum Rust version (Rust 1.85.0).
Thus simplify the code using `split_at_*checked()`.
Link: rust-lang/rust#119128 [1]
Link: rust-lang/rust#124678 [2]
Reviewed-by: Tamir Duberstein <tamird@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260405235309.418950-14-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>split_at_*checked()
1 parent 7fa2b09 commit 5c40af9
1 file changed
Lines changed: 6 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 69 | + | |
76 | 70 | | |
77 | | - | |
78 | | - | |
| 71 | + | |
79 | 72 | | |
80 | 73 | | |
81 | 74 | | |
| |||
108 | 101 | | |
109 | 102 | | |
110 | 103 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 104 | + | |
118 | 105 | | |
119 | | - | |
120 | | - | |
| 106 | + | |
121 | 107 | | |
122 | 108 | | |
123 | 109 | | |
| |||
147 | 133 | | |
148 | 134 | | |
149 | 135 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 136 | + | |
157 | 137 | | |
158 | | - | |
159 | | - | |
| 138 | + | |
160 | 139 | | |
161 | 140 | | |
162 | 141 | | |
| |||
0 commit comments