diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-25 17:30:02 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-25 17:30:02 +0200 |
commit | a60cd8f2a96aae3f7db8dfccec2aa5cf21f8c411 (patch) | |
tree | 24dc96e5384cf9309ae4ec00d6d91497e3253484 /crates/yt_dlp/src/logging.rs | |
parent | docs(yt_dlp/progress_hook): Add a note about the possibility to calculate vid... (diff) | |
download | yt-a60cd8f2a96aae3f7db8dfccec2aa5cf21f8c411.tar.gz yt-a60cd8f2a96aae3f7db8dfccec2aa5cf21f8c411.zip |
refactor(treewide): Conform to `cargo clippy`
Diffstat (limited to 'crates/yt_dlp/src/logging.rs')
-rw-r--r-- | crates/yt_dlp/src/logging.rs | 5 |
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 |