diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 7 | 
1 files changed, 4 insertions, 3 deletions
| @@ -1,6 +1,7 @@  extern crate lopdf;  use std::path::Path; +use std::str;  use lopdf::{Document, Object}; @@ -11,17 +12,17 @@ pub fn get_urls_from_pdf<P: AsRef<Path>>(path: P) {          match obj {              Object::Dictionary(d) => {                  for (k, v) in d.iter() { -                    let key = ::std::str::from_utf8(&k).unwrap(); +                    let key = str::from_utf8(&k).unwrap();                      if key == "A" {                          for (k, v) in v.as_dict().unwrap() { -                            let key = ::std::str::from_utf8(&k).unwrap(); +                            let key = str::from_utf8(&k).unwrap();                              if key == "URI" {                                  match v {                                      Object::String(s, _) => { -                                        println!("{}", ::std::str::from_utf8(s).unwrap()); +                                        println!("{}", str::from_utf8(s).unwrap());                                          ()                                      }, | 
