This commit is contained in:
Joe Fioti
2025-08-14 21:55:20 -04:00
parent fdeb011eea
commit 88dedff7f2
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
<img href="luminalai.com" alt="Screenshot 2025-08-14 at 9 18 54PM" src="https://github.com/user-attachments/assets/c5832634-55d5-45b7-ba65-6efe36afce4a" />
[![CI Status](https://img.shields.io/github/actions/workflow/status/jafioti/luminal/test.yml?style=for-the-badge&logo=github-actions&logoColor=white&branch=main)](https://github.com/jafioti/luminal/actions)
[![Docs](https://img.shields.io/badge/Documentation-green?style=for-the-badge&color=fc9700)](https://docs.luminalai.com)
[![Docs](https://img.shields.io/badge/Documentation-green?style=for-the-badge&color=0D9373)](https://docs.luminalai.com)
[![Current Crates.io Version](https://img.shields.io/crates/v/luminal.svg?style=for-the-badge&logo=rust)](https://crates.io/crates/luminal)
[![discord](https://dcbadge.limes.pink/api/server/APjuwHAbGy)](https://discord.gg/APjuwHAbGy)

View File

@@ -329,7 +329,7 @@ impl Graph {
/// .finish();
/// let b = GraphTensor::from_id(b_id, a.shape, a.graph());
/// ```
pub fn add_op<O: Operator + 'static>(&mut self, op: O) -> NewOp {
pub fn add_op<O: Operator + 'static>(&mut self, op: O) -> NewOp<'_> {
self.linearized_graph = None;
NewOp {
new_op_id: self.graph.add_node(Box::new(op)),
@@ -338,7 +338,7 @@ impl Graph {
}
}
/// Add op on the graph, and get back a NewOp. Just like add_op, except a boxed op is expected.
pub fn add_boxed_op(&mut self, op: Box<dyn Operator + 'static>) -> NewOp {
pub fn add_boxed_op(&mut self, op: Box<dyn Operator + 'static>) -> NewOp<'_> {
self.linearized_graph = None;
NewOp {
new_op_id: self.graph.add_node(op),