From 09216cd9f4189f708f48aaa7315f792b245845b4 Mon Sep 17 00:00:00 2001 From: Daniel Almeida Date: Wed, 12 Apr 2023 18:44:36 -0300 Subject: [PATCH] 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. Fix that by introducing a generic version instead. Part-of: --- src/nouveau/compiler/nak_ir.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nouveau/compiler/nak_ir.rs b/src/nouveau/compiler/nak_ir.rs index 51446bf8b02..c5a8daa4be8 100644 --- a/src/nouveau/compiler/nak_ir.rs +++ b/src/nouveau/compiler/nak_ir.rs @@ -2395,9 +2395,9 @@ pub struct Instr { } impl Instr { - pub fn new(op: Op) -> Instr { + pub fn new(op: impl Into) -> Instr { Instr { - op: op, + op: op.into(), pred: Pred::None, pred_inv: false, deps: InstrDeps::new(),