Skip to content

Commit af1bbd3

Browse files
committed
Return exif as slice instead of vector
1 parent 10cabc1 commit af1bbd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/decoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ impl<R: Read> Decoder<R> {
130130
/// Returns raw exif data, starting at the TIFF header, if the image contains any.
131131
///
132132
/// The returned value will be `None` until a call to `decode` has returned `Ok`.
133-
pub fn exif_data(&self) -> Option<Vec<u8>> {
134-
self.exif_data.as_ref().map(|v| v.clone())
133+
pub fn exif_data(&self) -> Option<&[u8]> {
134+
self.exif_data.as_ref().map(|v| v.as_slice())
135135
}
136136

137137
/// Returns the embeded icc profile if the image contains one.

0 commit comments

Comments
 (0)