Skip to content

Commit 2a0f79b

Browse files
update node::new to node::from_ptr
1 parent 5ad2433 commit 2a0f79b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/openvino/src/model.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl CompiledModel {
130130
self.ptr,
131131
std::ptr::addr_of_mut!(port)
132132
))?;
133-
Ok(Node::new(port))
133+
Ok(Node::from_ptr(port))
134134
}
135135

136136
/// Get an input port of the compiled model by port index.
@@ -141,7 +141,7 @@ impl CompiledModel {
141141
index,
142142
std::ptr::addr_of_mut!(port)
143143
))?;
144-
Ok(Node::new(port))
144+
Ok(Node::from_ptr(port))
145145
}
146146

147147
/// Get an input port of the compiled model by name.
@@ -153,7 +153,7 @@ impl CompiledModel {
153153
name,
154154
std::ptr::addr_of_mut!(port)
155155
))?;
156-
Ok(Node::new(port))
156+
Ok(Node::from_ptr(port))
157157
}
158158

159159
/// Get the number of outputs of the compiled model.
@@ -170,7 +170,7 @@ impl CompiledModel {
170170
self.ptr,
171171
std::ptr::addr_of_mut!(port)
172172
))?;
173-
Ok(Node::new(port))
173+
Ok(Node::from_ptr(port))
174174
}
175175

176176
/// Get an output port of the compiled model by port index.
@@ -181,7 +181,7 @@ impl CompiledModel {
181181
index,
182182
std::ptr::addr_of_mut!(port)
183183
))?;
184-
Ok(Node::new(port))
184+
Ok(Node::from_ptr(port))
185185
}
186186

187187
/// Get an output port of the compiled model by name.
@@ -193,7 +193,7 @@ impl CompiledModel {
193193
name,
194194
std::ptr::addr_of_mut!(port)
195195
))?;
196-
Ok(Node::new(port))
196+
Ok(Node::from_ptr(port))
197197
}
198198

199199
/// Gets runtime model information from a device.

0 commit comments

Comments
 (0)