Skip to content

Commit

Permalink
fix: io binding takes input by value, ref #66
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Jul 23, 2023
1 parent cb21def commit d7defd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/io_binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl<'s> IoBinding<'s> {
Ok(Self { ptr, session })
}

pub fn bind_input<'a, 'b: 'a, 'c: 'b, S: AsRef<str> + Clone + Debug>(&'a mut self, name: S, ort_value: &'c Value<'b>) -> OrtResult<()> {
pub fn bind_input<'a, 'b: 'a, S: AsRef<str> + Clone + Debug>(&'a mut self, name: S, ort_value: Value<'b>) -> OrtResult<()> {
let name = name.as_ref();
let cname = CString::new(name)?;
ortsys![unsafe BindInput(self.ptr, cname.as_ptr(), ort_value.ptr()) -> OrtError::CreateIoBinding];
Expand Down

1 comment on commit d7defd1

@SludgePhD
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change and should have incurred a version bump to 2.0.0, not 1.15.2

Please sign in to comment.