diff options
author | Teddy Wing | 2019-11-01 22:23:47 +0100 |
---|---|---|
committer | Teddy Wing | 2019-11-01 22:29:58 +0100 |
commit | adff229c543b765b1bfd7cb6c871d6b89617eff0 (patch) | |
tree | 7adf634a2ddb5d0ceed04394960edf74a084528b | |
parent | 14029dda1f4ad0f58a04c2b190bfebf6c93a9577 (diff) | |
download | pdf-urls-adff229c543b765b1bfd7cb6c871d6b89617eff0.tar.bz2 |
lib: Use `std::str`
Get rid of `::str`-prefixed calls.
-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()); () }, |