aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTeddy Wing2019-11-01 22:23:47 +0100
committerTeddy Wing2019-11-01 22:29:58 +0100
commitadff229c543b765b1bfd7cb6c871d6b89617eff0 (patch)
tree7adf634a2ddb5d0ceed04394960edf74a084528b /src
parent14029dda1f4ad0f58a04c2b190bfebf6c93a9577 (diff)
downloadpdf-urls-adff229c543b765b1bfd7cb6c871d6b89617eff0.tar.bz2
lib: Use `std::str`
Get rid of `::str`-prefixed calls.
Diffstat (limited to 'src')
-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());
()
},