Merge pull request #773 from libreddit/fmt_clippy
This commit is contained in:
commit
3b8a13d050
@ -253,7 +253,7 @@ impl Server {
|
|||||||
.boxed()
|
.boxed()
|
||||||
}
|
}
|
||||||
// If there was a routing error
|
// If there was a routing error
|
||||||
Err(e) => async move { new_boilerplate(def_headers, req_headers, 404, e.into()).await }.boxed(),
|
Err(e) => new_boilerplate(def_headers, req_headers, 404, e.into()).boxed(),
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
@ -379,7 +379,7 @@ fn determine_compressor(accept_encoding: String) -> Option<CompressionType> {
|
|||||||
|
|
||||||
// This loop reads the requested compressors and keeps track of whichever
|
// This loop reads the requested compressors and keeps track of whichever
|
||||||
// one has the highest priority per our heuristic.
|
// one has the highest priority per our heuristic.
|
||||||
for val in accept_encoding.to_string().split(',') {
|
for val in accept_encoding.split(',') {
|
||||||
let mut q: f64 = 1.0;
|
let mut q: f64 = 1.0;
|
||||||
|
|
||||||
// The compressor and q-value (if the latter is defined)
|
// The compressor and q-value (if the latter is defined)
|
||||||
|
30
src/utils.rs
30
src/utils.rs
@ -538,21 +538,21 @@ impl Preferences {
|
|||||||
}
|
}
|
||||||
Self {
|
Self {
|
||||||
available_themes: themes,
|
available_themes: themes,
|
||||||
theme: setting(&req, "theme"),
|
theme: setting(req, "theme"),
|
||||||
front_page: setting(&req, "front_page"),
|
front_page: setting(req, "front_page"),
|
||||||
layout: setting(&req, "layout"),
|
layout: setting(req, "layout"),
|
||||||
wide: setting(&req, "wide"),
|
wide: setting(req, "wide"),
|
||||||
show_nsfw: setting(&req, "show_nsfw"),
|
show_nsfw: setting(req, "show_nsfw"),
|
||||||
blur_nsfw: setting(&req, "blur_nsfw"),
|
blur_nsfw: setting(req, "blur_nsfw"),
|
||||||
use_hls: setting(&req, "use_hls"),
|
use_hls: setting(req, "use_hls"),
|
||||||
hide_hls_notification: setting(&req, "hide_hls_notification"),
|
hide_hls_notification: setting(req, "hide_hls_notification"),
|
||||||
autoplay_videos: setting(&req, "autoplay_videos"),
|
autoplay_videos: setting(req, "autoplay_videos"),
|
||||||
disable_visit_reddit_confirmation: setting(&req, "disable_visit_reddit_confirmation"),
|
disable_visit_reddit_confirmation: setting(req, "disable_visit_reddit_confirmation"),
|
||||||
comment_sort: setting(&req, "comment_sort"),
|
comment_sort: setting(req, "comment_sort"),
|
||||||
post_sort: setting(&req, "post_sort"),
|
post_sort: setting(req, "post_sort"),
|
||||||
subscriptions: setting(&req, "subscriptions").split('+').map(String::from).filter(|s| !s.is_empty()).collect(),
|
subscriptions: setting(req, "subscriptions").split('+').map(String::from).filter(|s| !s.is_empty()).collect(),
|
||||||
filters: setting(&req, "filters").split('+').map(String::from).filter(|s| !s.is_empty()).collect(),
|
filters: setting(req, "filters").split('+').map(String::from).filter(|s| !s.is_empty()).collect(),
|
||||||
hide_awards: setting(&req, "hide_awards"),
|
hide_awards: setting(req, "hide_awards"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user