Closed virtualritz closed 3 years ago
I was just wondering. Is there any reason to prefer:
let buf_name = CString::new("normal").unwrap(); unsafe { oidnSetSharedFilterImage( self.handle, buf_name.as_ptr(), ...
Over
unsafe { oidnSetSharedFilterImage( self.handle, &b"normal\0" as *const _ as _, ...
I'm still a Rust n00b but my gut tells me the latter will produce less code/have no runtime overhead.
I didn't know about the byte string stuff actually, this might be nicer to migrate too
I have a PR for you then later today. I also added set_hdr_scale() since I needed that.
set_hdr_scale()
Resolved in #10
I was just wondering. Is there any reason to prefer:
Over
I'm still a Rust n00b but my gut tells me the latter will produce less code/have no runtime overhead.