Description: avoid not-in-Debian crate tracing_unwrap
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2025-01-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/library/Cargo.toml
+++ b/library/Cargo.toml
@@ -27,7 +27,6 @@
 thiserror.workspace = true
 time.workspace = true
 tracing.workspace = true
-tracing-unwrap = { version = "1.0" }
 url.workspace = true
 
 [dev-dependencies]
--- a/library/src/parse/property/explicit/test.rs
+++ b/library/src/parse/property/explicit/test.rs
@@ -4,7 +4,6 @@
     ElementRef,
 };
 use microformats_types::temporal;
-use tracing_unwrap::OptionExt;
 
 #[test]
 fn linked() -> Result<(), crate::Error> {
@@ -12,7 +11,7 @@
         &from_html_str(r#"<a href='/foo' class='u-url'>a place</a>"#),
         "a",
     )
-    .unwrap_or_log();
+    .unwrap();
 
     let parser = explicit::PropertyParser::new(
         Arc::new(ElementRef {
@@ -45,7 +44,7 @@
     }
 )]
 fn temporal_value(html: &str, tag: &str, value: temporal::Value) -> Result<(), crate::Error> {
-    let elem = grab_element_from_document(&from_html_str(html), tag).unwrap_or_log();
+    let elem = grab_element_from_document(&from_html_str(html), tag).unwrap();
 
     let parser = explicit::PropertyParser::new(
         Arc::new(ElementRef {
@@ -71,7 +70,7 @@
         &from_html_str(r#"<span class="e-content">The name is in <strong>bold</strong>.</span>"#),
         "span",
     )
-    .unwrap_or_log();
+    .unwrap();
 
     let parser = explicit::PropertyParser::new(
         Arc::new(ElementRef {
@@ -107,7 +106,7 @@
     tag_link = { "link", r#"<link class="p-name value" href='/place' title="The name." />"# },
 )]
 fn plain(tag_name: &str, html: &str) -> Result<(), crate::Error> {
-    let elem = grab_element_from_document(&from_html_str(html), tag_name).unwrap_or_log();
+    let elem = grab_element_from_document(&from_html_str(html), tag_name).unwrap();
 
     let parser = PropertyParser::new(
         Arc::new(ElementRef {
@@ -135,7 +134,7 @@
         &from_html_str(r#"<br class="p-honorific-suffix" />BSc<br />"#),
         "br",
     )
-    .unwrap_or_log();
+    .unwrap();
 
     let parser = PropertyParser::new(
         Arc::new(ElementRef {
--- a/library/src/parse/property/implied/test.rs
+++ b/library/src/parse/property/implied/test.rs
@@ -3,7 +3,6 @@
     element::test::{from_html_str, grab_element_from_document},
     ElementRef,
 };
-use tracing_unwrap::OptionExt;
 
 #[yare::parameterized(
     simple = {
@@ -39,7 +38,7 @@
 )]
 fn photo(html: &str, tag: &str, value: Option<PropertyValue>) -> Result<(), crate::Error> {
     let base_url: url::Url = "http://example.com".parse()?;
-    let elem = grab_element_from_document(&from_html_str(html), tag).unwrap_or_log();
+    let elem = grab_element_from_document(&from_html_str(html), tag).unwrap();
 
     let parser = ImpliedPhotoExtractor(Arc::new(ElementRef {
         index: 0,
@@ -106,7 +105,7 @@
     let direct_parser = ImpliedNameExtractor(Arc::new(ElementRef {
         index: 0,
         node: Node {
-            elem: grab_element_from_document(&from_html_str(&full_html), tag).unwrap_or_log(),
+            elem: grab_element_from_document(&from_html_str(&full_html), tag).unwrap(),
         },
     }));
 
@@ -120,7 +119,7 @@
 #[test]
 fn url() -> Result<(), crate::Error> {
     let dom = from_html_str(r#"<div class="h-item"><a class="h-item" href="/"></a></div>"#);
-    let parent_elem = grab_element_from_document(&dom, "div").unwrap_or_log();
+    let parent_elem = grab_element_from_document(&dom, "div").unwrap();
 
     let parent_parser = PropertiesParser::new(
         Arc::new(ElementRef {
@@ -138,7 +137,7 @@
 
     assert_eq!(parent_parser.implied_url(), None, "did not imply a URL");
 
-    let child_elem = grab_element_from_document(&dom, "a").unwrap_or_log();
+    let child_elem = grab_element_from_document(&dom, "a").unwrap();
 
     let child_parser = PropertiesParser::new(
         Arc::new(ElementRef {
--- a/library/src/parse/property/item/test.rs
+++ b/library/src/parse/property/item/test.rs
@@ -4,14 +4,13 @@
     ElementRef, MatchedElements,
 };
 use microformats_types::KnownClass;
-use tracing_unwrap::OptionExt;
 
 #[test]
 fn plain() -> Result<(), crate::parse::Error> {
     let plain_text_dom = from_html_str(
         r#"<div class='h-entry'><a href='/foo' class='p-author h-card'>a <span class='p-tag'>place</span></a></div>"#,
     );
-    let plain_text_elem = grab_element_from_document(&plain_text_dom, "a").unwrap_or_log();
+    let plain_text_elem = grab_element_from_document(&plain_text_dom, "a").unwrap();
 
     let plain_text_parser = PropertyParser::new(
         Arc::new(ElementRef {
@@ -56,7 +55,7 @@
     let linked_dom = from_html_str(
         r#"<div class='h-entry'><a href='/foo' class='u-author h-card'>a <span class='p-name'>place</span></a></div>"#,
     );
-    let linked_elem = grab_element_from_document(&linked_dom, "a").unwrap_or_log();
+    let linked_elem = grab_element_from_document(&linked_dom, "a").unwrap();
 
     let linked_parser = PropertyParser::new(
         Arc::new(ElementRef {
--- a/types/Cargo.toml
+++ b/types/Cargo.toml
@@ -18,7 +18,6 @@
 thiserror = { workspace = true }
 time = { workspace = true }
 tracing = { version = "0.1", optional = true }
-tracing-unwrap = { version = "1.0", optional = true }
 url = { workspace = true }
 
 [dev-dependencies]
