mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
nak: make Instr::new() generic
The previous signature for Instr::new() was too restrictive in that it would create a new Instr from Op, but not from T: Into<Op>. Fix that by introducing a generic version instead. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
parent
b448151925
commit
09216cd9f4
1 changed files with 2 additions and 2 deletions
|
|
@ -2395,9 +2395,9 @@ pub struct Instr {
|
|||
}
|
||||
|
||||
impl Instr {
|
||||
pub fn new(op: Op) -> Instr {
|
||||
pub fn new(op: impl Into<Op>) -> Instr {
|
||||
Instr {
|
||||
op: op,
|
||||
op: op.into(),
|
||||
pred: Pred::None,
|
||||
pred_inv: false,
|
||||
deps: InstrDeps::new(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue