Skip to content

Commit

Permalink
Cargo clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
taoky committed Aug 26, 2024
1 parent 921b6dd commit 271829b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/cli/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ fn determinate_timezone(
) -> Option<(Option<Url>, Url)> {
info!("Try finding first File in {}", url);
let list = again(|| parser.get_list(async_context, url), args.retry)
.expect(&format!(
"Failed to get list for {}. Maybe you shall disable timezone guessing?",
url
));
.unwrap_or_else(|_| panic!("Failed to get list for {}. Maybe you shall disable timezone guessing?", url));
match list {
ListResult::List(list) => {
for item in list {
Expand Down
4 changes: 2 additions & 2 deletions src/parser/lighttpd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ mod tests {
#[test]
fn test_buildroot_root() {
let context = init_async_context();
let items = LighttpdListingParser::default()
let items = LighttpdListingParser
.get_list(
&context,
&Url::parse("http://localhost:1921/buildroot/").unwrap(),
Expand Down Expand Up @@ -134,7 +134,7 @@ mod tests {
#[test]
fn test_buildroot_subfolder() {
let context = init_async_context();
let items = LighttpdListingParser::default()
let items = LighttpdListingParser
.get_list(
&context,
&Url::parse("http://localhost:1921/buildroot/acl/").unwrap(),
Expand Down

0 comments on commit 271829b

Please sign in to comment.