Update the example to use struct Reader instead of parse_image().

This commit is contained in:
KAMADA Ken'ichi 2017-02-24 20:48:38 +09:00
parent 1d5d9fdd38
commit 74cd3435b8
1 changed files with 3 additions and 4 deletions

View File

@ -32,10 +32,9 @@
//!
//! ```
//! let file = std::fs::File::open("tests/exif.jpg").unwrap();
//! let mut reader = std::io::BufReader::new(&file);
//! let mut buf = Vec::new();
//! let (fields, _) = exif::parse_image(&mut reader, &mut buf).unwrap();
//! for f in fields {
//! let reader = exif::Reader::new(
//! &mut std::io::BufReader::new(&file)).unwrap();
//! for f in reader.fields() {
//! println!("{} {} {:?}", f.tag, f.thumbnail, f.value);
//! }
//! ```