aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index f1ac517..cb96c0e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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());
()
},