diff options
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")?; |