diff options
author | James Campos <james.r.campos@gmail.com> | 2021-01-03 17:54:33 -0800 |
---|---|---|
committer | James Campos <james.r.campos@gmail.com> | 2021-01-03 17:54:33 -0800 |
commit | f20adc60a3dcc744a3adbd40ba6aa6917f06d9c7 (patch) | |
tree | 3089a3ad03b88e1f89bb85911bc89588b7bc62a8 /src/epub.rs | |
parent | 197a6cb7d5c962eb82c94b5a2304de2efcab27a6 (diff) | |
download | bk-f20adc60a3dcc744a3adbd40ba6aa6917f06d9c7.tar.gz |
cargo update
Diffstat (limited to 'src/epub.rs')
-rw-r--r-- | src/epub.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/epub.rs b/src/epub.rs index 496ee96..9fb2adc 100644 --- a/src/epub.rs +++ b/src/epub.rs @@ -86,7 +86,7 @@ impl Epub { } fn get_spine(&mut self) -> Result<Vec<(String, String)>> { let xml = self.get_text("META-INF/container.xml"); - let doc = Document::parse(&xml)?; + let doc = Document::parse(&xml).unwrap(); let path = doc .descendants() .find(|n| n.has_tag_name("rootfile")) @@ -94,7 +94,7 @@ impl Epub { .attribute("full-path") .unwrap(); let xml = self.get_text(path); - let doc = Document::parse(&xml)?; + let doc = Document::parse(&xml).unwrap(); // zip expects unix path even on windows self.rootdir = match path.rfind('/') { @@ -131,13 +131,13 @@ impl Epub { .attribute("href") .unwrap(); let xml = self.get_text(&format!("{}{}", self.rootdir, path)); - let doc = Document::parse(&xml)?; + let doc = Document::parse(&xml).unwrap(); epub3(doc, &mut nav); } else { let id = spine_node.attribute("toc").unwrap_or("ncx"); let path = manifest.get(id).unwrap(); let xml = self.get_text(&format!("{}{}", self.rootdir, path)); - let doc = Document::parse(&xml)?; + let doc = Document::parse(&xml).unwrap(); epub2(doc, &mut nav); } Ok(spine_node |