From 8fb0408e1d4e50a25cd900237976f3ee310e1da8 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 2 Nov 2019 06:26:20 +0100 Subject: Add license (GNU GPLv3+) --- src/lib.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index fb0b75d..8e4da1b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,20 @@ +// Copyright (c) 2019 Teddy Wing +// +// This file is part of PDF-URLs. +// +// PDF-URLs is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// PDF-URLs is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with PDF-URLs. If not, see . + mod errors; extern crate lopdf; @@ -32,7 +49,7 @@ pub fn get_urls_from_pdf>(path: P) -> Result> { if key == "URI" { match v { Object::String(s, _) => { - urls.push(String::from_utf8(s.to_vec())?); + urls.push(String::from_utf8_lossy(s).to_string()); }, _ => (), } -- cgit v1.2.3