diff --git a/hammond-downloader/src/downloader.rs b/hammond-downloader/src/downloader.rs index 3a04db6..b54573d 100644 --- a/hammond-downloader/src/downloader.rs +++ b/hammond-downloader/src/downloader.rs @@ -45,7 +45,7 @@ fn download_into( info!("Redirect Attempt URL: {:?}", attempt.url()); if attempt.previous().len() > 5 { attempt.too_many_redirects() - } else if attempt.url() == attempt.previous().last().unwrap() { + } else if Some(attempt.url()) == attempt.previous().last() { attempt.loop_detected() } else { attempt.follow()