aboutsummaryrefslogtreecommitdiffstats
path: root/crates/yt_dlp/src/logging.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/yt_dlp/src/logging.rs')
-rw-r--r--crates/yt_dlp/src/logging.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/yt_dlp/src/logging.rs b/crates/yt_dlp/src/logging.rs
index cca917c..02af3ff 100644
--- a/crates/yt_dlp/src/logging.rs
+++ b/crates/yt_dlp/src/logging.rs
@@ -20,7 +20,7 @@ use pyo3::{
/// Consume a Python `logging.LogRecord` and emit a Rust `Log` instead.
#[pyfunction]
-fn host_log<'a>(record: Bound<'a, PyAny>, rust_target: &str) -> PyResult<()> {
+fn host_log(record: Bound<'_, PyAny>, rust_target: &str) -> PyResult<()> {
let level = record.getattr("levelno")?;
let message = record.getattr("getMessage")?.call0()?.to_string();
let pathname = record.getattr("pathname")?.to_string();
@@ -42,8 +42,7 @@ fn host_log<'a>(record: Bound<'a, PyAny>, rust_target: &str) -> PyResult<()> {
};
let target = full_target
- .as_ref()
- .map(|x| x.as_str())
+ .as_deref()
.unwrap_or(rust_target);
// error