From a007460029be3abbfb3f9a895e8dcc3dcf70d5c3 Mon Sep 17 00:00:00 2001 From: James Wykeham-Martin Date: Fri, 2 Feb 2018 15:41:00 +0000 Subject: [PATCH] Added Some to attempt.url() and removed unwrap --- hammond-downloader/src/downloader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()