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/lib.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/lib.rs')
-rw-r--r-- | crates/yt_dlp/src/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/yt_dlp/src/lib.rs b/crates/yt_dlp/src/lib.rs index b0dffa4..2f554a9 100644 --- a/crates/yt_dlp/src/lib.rs +++ b/crates/yt_dlp/src/lib.rs @@ -81,7 +81,7 @@ signal.signal(signal.SIGINT, signal.SIG_DFL) } #[pyfunction] -pub fn progress_hook<'a>(py: Python, input: Bound<'_, PyDict>) -> PyResult<()> { +pub fn progress_hook(py: Python, input: Bound<'_, PyDict>) -> PyResult<()> { // Only add the handler, if the log-level is higher than Debug (this avoids covering debug // messages). if log_enabled!(Level::Debug) { @@ -350,7 +350,9 @@ pub async fn download( let result_string = if let Some(filename) = info_json.filename { filename } else { - (&info_json.requested_downloads.expect("This must exist")[0].filename).to_owned() + info_json.requested_downloads.expect("This must exist")[0] + .filename + .to_owned() }; out_paths.push(result_string); @@ -407,7 +409,7 @@ fn json_loads(py: Python, input: String) -> PyResult<Bound<PyDict>> { .clone()) } -fn get_yt_dlp_utils<'a>(py: Python<'a>) -> PyResult<Bound<'a, PyAny>> { +fn get_yt_dlp_utils(py: Python<'_>) -> PyResult<Bound<'_, PyAny>> { let yt_dlp = PyModule::import_bound(py, "yt_dlp")?; let utils = yt_dlp.getattr("utils")?; |