mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
compiler/rust: Stop using try_into() for u8 -> usize
Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849>
This commit is contained in:
parent
511f747fb8
commit
0cdd37b5ff
1 changed files with 2 additions and 5 deletions
|
|
@ -216,10 +216,7 @@ impl nir_alu_instr {
|
|||
}
|
||||
|
||||
pub fn srcs_as_slice(&self) -> &[nir_alu_src] {
|
||||
unsafe {
|
||||
self.src
|
||||
.as_slice(self.info().num_inputs.try_into().unwrap())
|
||||
}
|
||||
unsafe { self.src.as_slice(self.info().num_inputs.into()) }
|
||||
}
|
||||
|
||||
pub fn get_src(&self, idx: usize) -> &nir_alu_src {
|
||||
|
|
@ -264,7 +261,7 @@ impl nir_intrinsic_instr {
|
|||
}
|
||||
|
||||
pub fn srcs_as_slice(&self) -> &[nir_src] {
|
||||
unsafe { self.src.as_slice(self.info().num_srcs.try_into().unwrap()) }
|
||||
unsafe { self.src.as_slice(self.info().num_srcs.into()) }
|
||||
}
|
||||
|
||||
pub fn get_src(&self, idx: usize) -> &nir_src {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue