Change MagickWand::read_image_blob to use ref

Breaking change.

The `read_image_blob` function does not need to take ownership of the
image byte array.
This commit is contained in:
Herman J. Radtke III
2016-06-25 09:47:09 -07:00
parent 40ebf0fbf7
commit 1b2d7010af

View File

@ -81,7 +81,7 @@ impl MagickWand {
} }
/// Read the image data from the vector of bytes. /// Read the image data from the vector of bytes.
pub fn read_image_blob(&self, data: Vec<u8>) -> Result<(), &'static str> { pub fn read_image_blob(&self, data: &Vec<u8>) -> Result<(), &'static str> {
let int_slice = &data[..]; let int_slice = &data[..];
let size = data.len(); let size = data.len();
let result = unsafe { let result = unsafe {