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:
Daniel Almeida 2023-04-12 18:44:36 -03:00 committed by Marge Bot
parent b448151925
commit 09216cd9f4

View file

@ -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(),