Privaxy CI #26
privaxy-ci.yml
on: schedule
Matrix: build / Build privaxy-cli for x86_64-unknown-linux-gnu
Matrix: build / Build privaxy-cli for x86_64-pc-windows-msvc
Matrix: build / Build privaxy-gui for x86_64-unknown-linux-gnu
Matrix: build / Build privaxy-gui for x86_64-pc-windows-msvc
Matrix: check / clippy
Matrix: check / fmt
Matrix: check / msrv
Annotations
201 warnings
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L112
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:112:39
|
112 | let mut top_clients = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _______________________________________^
113 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L95
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:95:45
|
95 | let mut top_blocked_paths = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _____________________________________________^
96 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L183
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:183:25
|
183 | / style_selectors
184 | | .into_iter()
185 | | .map(|(selector, content)| {
186 | | format!(
... |
191 | | })
192 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:185:30
|
185 | ... .map(|(selector, content)| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:186:33
|
186 | / ... format!(
187 | | ... "{selector} {{ {content} }}",
188 | | ... selector = selector,
189 | | ... content = content.join(";")
190 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L160
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:160:25
|
160 | / blocker_result
161 | | .hidden_selectors
162 | | .into_iter()
163 | | .map(|selector| {
... |
173 | | })
174 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:163:30
|
163 | ... .map(|selector| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:164:33
|
164 | / ... format!(
165 | | ... r#"
166 | | ... {}
167 | | ... {{
... |
171 | | ... selector
172 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default
|
calls to `push` immediately after creation:
privaxy/src/server/proxy/exclusions.rs#L35
warning: calls to `push` immediately after creation
--> privaxy/src/server/proxy/exclusions.rs:35:9
|
35 | / let mut exclusions = Vec::new();
36 | |
37 | | // Apple service exclusions, as defined in : https://support.apple.com/en-us/HT210060
38 | | // > Apple services will fail any connection that uses
... |
73 | | exclusions.push(String::from("devimages-cdn.apple.com"));
74 | | exclusions.push(String::from("download.developer.apple.com"));
| |______________________________________________________________________^ help: consider using the `vec![]` macro: `let exclusions = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
|
the borrowed expression implements the required traits:
privaxy/src/server/blocker_utils.rs#L215
warning: the borrowed expression implements the required traits
--> privaxy/src/server/blocker_utils.rs:215:28
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `utf8string.replace('\r', "")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L19
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:19:5
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ++
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L14
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:14:5
|
14 | /// directory
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
14 | /// directory
| ++
|
field `data` is never read:
privaxy/src/server/blocker_utils.rs#L23
warning: field `data` is never read
--> privaxy/src/server/blocker_utils.rs:23:9
|
20 | pub struct ResourceProperties {
| ------------------ field in this struct
...
23 | pub data: Option<String>,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L217
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:217:22
|
217 | _ => base64::encode(resource_contents),
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L215
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:215:21
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L188
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:188:30
|
188 | content: base64::encode(&script),
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
this let-binding has unit value:
web_frontend/src/main.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/main.rs:108:37
|
108 | html! { <>{navigation} <NotFound /></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 | html! { <>{navigation} <html! { <>{navigation} <NotFound /></> }; /></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | html! { <>{navigation} <() /></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L101
warning: this let-binding has unit value
--> web_frontend/src/main.rs:101:103
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> };::Requests /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Requests /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L97
warning: this let-binding has unit value
--> web_frontend/src/main.rs:97:102
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> }
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> };::Dashboard /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Dashboard /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/settings.rs#L52
warning: this let-binding has unit value
--> web_frontend/src/settings.rs:52:22
|
52 | html! { <Filters />}
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
52 | html! { <html! { <Filters />}; />}
| ~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
52 | html! { <() />}
| ~~
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
web_frontend/src/filters.rs#L127
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> web_frontend/src/filters.rs:127:17
|
127 | / self.filter_configuration
128 | | .as_mut()
129 | | .unwrap()
130 | | .0
... |
136 | | Some(filter)
137 | | });
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
133 ~ .map(|filter| {
134 | filter.enabled = enabled;
135 |
136 ~ filter
|
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:108:26
|
108 | <BlockingEnabled />
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 ~ <html! {
109 + <>
110 + <div class="md:flex md:justify-between md:space-x-5">
111 + <div class="pt-1.5">
112 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
113 + class=" mt-3 ml-3 inline pulsating-circle"></div>
114 + </h1>
115 + </div>
116 + <div
117 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
118 + <SaveCaCertificate />
119 + <BlockingEnabled />
120 + </div>
121 + </div>
122 +
123 + <dl
124 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
125 + <div class="px-4 py-5 sm:p-6">
126 + <dt class="text-base font-normal text-gray-900">
127 + {"Proxied requests"}
128 + </dt>
129 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
130 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
131 + { some_or_loading(self.message.proxied_requests) }
132 + </div>
133 + </dd>
134 + </div>
135 +
136 + <div class="px-4 py-5 sm:p-6">
137 + <dt class="text-base font-normal text-gray-900">
138 + {"Blocked requests"}
139 + </dt>
140 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
141 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
142 + { some_or_loading(self.message.blocked_requests) }
143 + </div>
144 + </dd>
145 + </div>
146 +
147 + <div class="px-4 py-5 sm:p-6">
148 + <dt class="text-base font-normal text-gray-900">
149 + {"Modified responses"}
150 + </dt>
151 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
152 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
153 + { some_or_loading(self.message.modified_responses) }
154 + </div>
155 + </dd>
156 + </div>
157 + </dl>
158 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
159 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
160 + <div class="px-4 py-5 sm:px-6">
161 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
162 + </div>
163 + <div class="px-4 py-5 sm:p-6">
164 + <ol role="list" class="divide-y divide-gray-200">
165 + { for self.message.top_blocked_paths.iter().map(|(path,
166 + count)|render_list_element(path, *count)) }
167 + </ol>
168 +
169 + </div>
170 + </div>
171 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
172 + <div class="px-4 py-5 sm:px-6">
173 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
174 + </div>
175 + <div class="px-4 py-5 sm:p-6">
176 + <ol role="list" class="divide-y divide-gray-200">
177 + { for self.message.top_clients.iter().map(|(client,
178 + count)|render_list_element(client, *count)) }
179 + </ol>
180 + </div>
181 + </div>
182 + </div>
183 + </>
184 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | <() />
| ~~
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L107
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:107:22
|
107 | <SaveCaCertificate />
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
107 ~ <html! {
108 + <>
109 + <div class="md:flex md:justify-between md:space-x-5">
110 + <div class="pt-1.5">
111 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
112 + class=" mt-3 ml-3 inline pulsating-circle"></div>
113 + </h1>
114 + </div>
115 + <div
116 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
117 + <SaveCaCertificate />
118 + <BlockingEnabled />
119 + </div>
120 + </div>
121 +
122 + <dl
123 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
124 + <div class="px-4 py-5 sm:p-6">
125 + <dt class="text-base font-normal text-gray-900">
126 + {"Proxied requests"}
127 + </dt>
128 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
129 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
130 + { some_or_loading(self.message.proxied_requests) }
131 + </div>
132 + </dd>
133 + </div>
134 +
135 + <div class="px-4 py-5 sm:p-6">
136 + <dt class="text-base font-normal text-gray-900">
137 + {"Blocked requests"}
138 + </dt>
139 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
140 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
141 + { some_or_loading(self.message.blocked_requests) }
142 + </div>
143 + </dd>
144 + </div>
145 +
146 + <div class="px-4 py-5 sm:p-6">
147 + <dt class="text-base font-normal text-gray-900">
148 + {"Modified responses"}
149 + </dt>
150 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
151 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
152 + { some_or_loading(self.message.modified_responses) }
153 + </div>
154 + </dd>
155 + </div>
156 + </dl>
157 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
158 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
159 + <div class="px-4 py-5 sm:px-6">
160 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
161 + </div>
162 + <div class="px-4 py-5 sm:p-6">
163 + <ol role="list" class="divide-y divide-gray-200">
164 + { for self.message.top_blocked_paths.iter().map(|(path,
165 + count)|render_list_element(path, *count)) }
166 + </ol>
167 +
168 + </div>
169 + </div>
170 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
171 + <div class="px-4 py-5 sm:px-6">
172 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
173 + </div>
174 + <div class="px-4 py-5 sm:p-6">
175 + <ol role="list" class="divide-y divide-gray-200">
176 + { for self.message.top_clients.iter().map(|(client,
177 + count)|render_list_element(client, *count)) }
178 + </ol>
179 + </div>
180 + </div>
181 + </div>
182 + </>
183 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
107 | <() />
| ~~
|
variant `Red` is never constructed:
web_frontend/src/submit_banner.rs#L8
warning: variant `Red` is never constructed
--> web_frontend/src/submit_banner.rs:8:5
|
6 | pub enum Color {
| ----- variant in this enum
7 | Green,
8 | Red,
| ^^^
|
= note: `Color` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
check / ( clippy + doc ) rust beta - node latest
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
check / ( clippy + doc ) rust beta - node latest
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L112
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:112:39
|
112 | let mut top_clients = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _______________________________________^
113 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L95
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:95:45
|
95 | let mut top_blocked_paths = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _____________________________________________^
96 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L183
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:183:25
|
183 | / style_selectors
184 | | .into_iter()
185 | | .map(|(selector, content)| {
186 | | format!(
... |
191 | | })
192 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:185:30
|
185 | ... .map(|(selector, content)| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:186:33
|
186 | / ... format!(
187 | | ... "{selector} {{ {content} }}",
188 | | ... selector = selector,
189 | | ... content = content.join(";")
190 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L160
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:160:25
|
160 | / blocker_result
161 | | .hidden_selectors
162 | | .into_iter()
163 | | .map(|selector| {
... |
173 | | })
174 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:163:30
|
163 | ... .map(|selector| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:164:33
|
164 | / ... format!(
165 | | ... r#"
166 | | ... {}
167 | | ... {{
... |
171 | | ... selector
172 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default
|
calls to `push` immediately after creation:
privaxy/src/server/proxy/exclusions.rs#L35
warning: calls to `push` immediately after creation
--> privaxy/src/server/proxy/exclusions.rs:35:9
|
35 | / let mut exclusions = Vec::new();
36 | |
37 | | // Apple service exclusions, as defined in : https://support.apple.com/en-us/HT210060
38 | | // > Apple services will fail any connection that uses
... |
73 | | exclusions.push(String::from("devimages-cdn.apple.com"));
74 | | exclusions.push(String::from("download.developer.apple.com"));
| |______________________________________________________________________^ help: consider using the `vec![]` macro: `let exclusions = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
|
the borrowed expression implements the required traits:
privaxy/src/server/blocker_utils.rs#L215
warning: the borrowed expression implements the required traits
--> privaxy/src/server/blocker_utils.rs:215:28
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `utf8string.replace('\r', "")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L19
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:19:5
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ++
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L14
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:14:5
|
14 | /// directory
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
14 | /// directory
| ++
|
field `data` is never read:
privaxy/src/server/blocker_utils.rs#L23
warning: field `data` is never read
--> privaxy/src/server/blocker_utils.rs:23:9
|
20 | pub struct ResourceProperties {
| ------------------ field in this struct
...
23 | pub data: Option<String>,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L217
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:217:22
|
217 | _ => base64::encode(resource_contents),
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L215
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:215:21
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L188
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:188:30
|
188 | content: base64::encode(&script),
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
this let-binding has unit value:
web_frontend/src/main.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/main.rs:108:37
|
108 | html! { <>{navigation} <NotFound /></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 | html! { <>{navigation} <html! { <>{navigation} <NotFound /></> }; /></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | html! { <>{navigation} <() /></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L101
warning: this let-binding has unit value
--> web_frontend/src/main.rs:101:103
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> };::Requests /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Requests /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L97
warning: this let-binding has unit value
--> web_frontend/src/main.rs:97:102
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> }
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> };::Dashboard /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Dashboard /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/settings.rs#L52
warning: this let-binding has unit value
--> web_frontend/src/settings.rs:52:22
|
52 | html! { <Filters />}
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
52 | html! { <html! { <Filters />}; />}
| ~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
52 | html! { <() />}
| ~~
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
web_frontend/src/filters.rs#L127
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> web_frontend/src/filters.rs:127:17
|
127 | / self.filter_configuration
128 | | .as_mut()
129 | | .unwrap()
130 | | .0
... |
136 | | Some(filter)
137 | | });
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
133 ~ .map(|filter| {
134 | filter.enabled = enabled;
135 |
136 ~ filter
|
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:108:26
|
108 | <BlockingEnabled />
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 ~ <html! {
109 + <>
110 + <div class="md:flex md:justify-between md:space-x-5">
111 + <div class="pt-1.5">
112 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
113 + class=" mt-3 ml-3 inline pulsating-circle"></div>
114 + </h1>
115 + </div>
116 + <div
117 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
118 + <SaveCaCertificate />
119 + <BlockingEnabled />
120 + </div>
121 + </div>
122 +
123 + <dl
124 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
125 + <div class="px-4 py-5 sm:p-6">
126 + <dt class="text-base font-normal text-gray-900">
127 + {"Proxied requests"}
128 + </dt>
129 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
130 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
131 + { some_or_loading(self.message.proxied_requests) }
132 + </div>
133 + </dd>
134 + </div>
135 +
136 + <div class="px-4 py-5 sm:p-6">
137 + <dt class="text-base font-normal text-gray-900">
138 + {"Blocked requests"}
139 + </dt>
140 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
141 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
142 + { some_or_loading(self.message.blocked_requests) }
143 + </div>
144 + </dd>
145 + </div>
146 +
147 + <div class="px-4 py-5 sm:p-6">
148 + <dt class="text-base font-normal text-gray-900">
149 + {"Modified responses"}
150 + </dt>
151 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
152 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
153 + { some_or_loading(self.message.modified_responses) }
154 + </div>
155 + </dd>
156 + </div>
157 + </dl>
158 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
159 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
160 + <div class="px-4 py-5 sm:px-6">
161 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
162 + </div>
163 + <div class="px-4 py-5 sm:p-6">
164 + <ol role="list" class="divide-y divide-gray-200">
165 + { for self.message.top_blocked_paths.iter().map(|(path,
166 + count)|render_list_element(path, *count)) }
167 + </ol>
168 +
169 + </div>
170 + </div>
171 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
172 + <div class="px-4 py-5 sm:px-6">
173 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
174 + </div>
175 + <div class="px-4 py-5 sm:p-6">
176 + <ol role="list" class="divide-y divide-gray-200">
177 + { for self.message.top_clients.iter().map(|(client,
178 + count)|render_list_element(client, *count)) }
179 + </ol>
180 + </div>
181 + </div>
182 + </div>
183 + </>
184 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | <() />
| ~~
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L107
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:107:22
|
107 | <SaveCaCertificate />
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
107 ~ <html! {
108 + <>
109 + <div class="md:flex md:justify-between md:space-x-5">
110 + <div class="pt-1.5">
111 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
112 + class=" mt-3 ml-3 inline pulsating-circle"></div>
113 + </h1>
114 + </div>
115 + <div
116 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
117 + <SaveCaCertificate />
118 + <BlockingEnabled />
119 + </div>
120 + </div>
121 +
122 + <dl
123 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
124 + <div class="px-4 py-5 sm:p-6">
125 + <dt class="text-base font-normal text-gray-900">
126 + {"Proxied requests"}
127 + </dt>
128 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
129 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
130 + { some_or_loading(self.message.proxied_requests) }
131 + </div>
132 + </dd>
133 + </div>
134 +
135 + <div class="px-4 py-5 sm:p-6">
136 + <dt class="text-base font-normal text-gray-900">
137 + {"Blocked requests"}
138 + </dt>
139 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
140 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
141 + { some_or_loading(self.message.blocked_requests) }
142 + </div>
143 + </dd>
144 + </div>
145 +
146 + <div class="px-4 py-5 sm:p-6">
147 + <dt class="text-base font-normal text-gray-900">
148 + {"Modified responses"}
149 + </dt>
150 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
151 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
152 + { some_or_loading(self.message.modified_responses) }
153 + </div>
154 + </dd>
155 + </div>
156 + </dl>
157 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
158 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
159 + <div class="px-4 py-5 sm:px-6">
160 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
161 + </div>
162 + <div class="px-4 py-5 sm:p-6">
163 + <ol role="list" class="divide-y divide-gray-200">
164 + { for self.message.top_blocked_paths.iter().map(|(path,
165 + count)|render_list_element(path, *count)) }
166 + </ol>
167 +
168 + </div>
169 + </div>
170 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
171 + <div class="px-4 py-5 sm:px-6">
172 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
173 + </div>
174 + <div class="px-4 py-5 sm:p-6">
175 + <ol role="list" class="divide-y divide-gray-200">
176 + { for self.message.top_clients.iter().map(|(client,
177 + count)|render_list_element(client, *count)) }
178 + </ol>
179 + </div>
180 + </div>
181 + </div>
182 + </>
183 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
107 | <() />
| ~~
|
variant `Red` is never constructed:
web_frontend/src/submit_banner.rs#L8
warning: variant `Red` is never constructed
--> web_frontend/src/submit_banner.rs:8:5
|
6 | pub enum Color {
| ----- variant in this enum
7 | Green,
8 | Red,
| ^^^
|
= note: `Color` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L112
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:112:39
|
112 | let mut top_clients = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _______________________________________^
113 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L95
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:95:45
|
95 | let mut top_blocked_paths = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _____________________________________________^
96 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L183
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:183:25
|
183 | / style_selectors
184 | | .into_iter()
185 | | .map(|(selector, content)| {
186 | | format!(
... |
191 | | })
192 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:185:30
|
185 | ... .map(|(selector, content)| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:186:33
|
186 | / ... format!(
187 | | ... "{selector} {{ {content} }}",
188 | | ... selector = selector,
189 | | ... content = content.join(";")
190 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L160
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:160:25
|
160 | / blocker_result
161 | | .hidden_selectors
162 | | .into_iter()
163 | | .map(|selector| {
... |
173 | | })
174 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:163:30
|
163 | ... .map(|selector| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:164:33
|
164 | / ... format!(
165 | | ... r#"
166 | | ... {}
167 | | ... {{
... |
171 | | ... selector
172 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default
|
calls to `push` immediately after creation:
privaxy/src/server/proxy/exclusions.rs#L35
warning: calls to `push` immediately after creation
--> privaxy/src/server/proxy/exclusions.rs:35:9
|
35 | / let mut exclusions = Vec::new();
36 | |
37 | | // Apple service exclusions, as defined in : https://support.apple.com/en-us/HT210060
38 | | // > Apple services will fail any connection that uses
... |
73 | | exclusions.push(String::from("devimages-cdn.apple.com"));
74 | | exclusions.push(String::from("download.developer.apple.com"));
| |______________________________________________________________________^ help: consider using the `vec![]` macro: `let exclusions = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
|
the borrowed expression implements the required traits:
privaxy/src/server/blocker_utils.rs#L215
warning: the borrowed expression implements the required traits
--> privaxy/src/server/blocker_utils.rs:215:28
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `utf8string.replace('\r', "")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L19
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:19:5
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ++
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L14
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:14:5
|
14 | /// directory
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
14 | /// directory
| ++
|
field `data` is never read:
privaxy/src/server/blocker_utils.rs#L23
warning: field `data` is never read
--> privaxy/src/server/blocker_utils.rs:23:9
|
20 | pub struct ResourceProperties {
| ------------------ field in this struct
...
23 | pub data: Option<String>,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L217
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:217:22
|
217 | _ => base64::encode(resource_contents),
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L215
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:215:21
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L188
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:188:30
|
188 | content: base64::encode(&script),
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
this let-binding has unit value:
web_frontend/src/main.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/main.rs:108:37
|
108 | html! { <>{navigation} <NotFound /></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 | html! { <>{navigation} <html! { <>{navigation} <NotFound /></> }; /></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | html! { <>{navigation} <() /></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L101
warning: this let-binding has unit value
--> web_frontend/src/main.rs:101:103
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> };::Requests /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Requests /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L97
warning: this let-binding has unit value
--> web_frontend/src/main.rs:97:102
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> }
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> };::Dashboard /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Dashboard /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/settings.rs#L52
warning: this let-binding has unit value
--> web_frontend/src/settings.rs:52:22
|
52 | html! { <Filters />}
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
52 | html! { <html! { <Filters />}; />}
| ~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
52 | html! { <() />}
| ~~
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
web_frontend/src/filters.rs#L127
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> web_frontend/src/filters.rs:127:17
|
127 | / self.filter_configuration
128 | | .as_mut()
129 | | .unwrap()
130 | | .0
... |
136 | | Some(filter)
137 | | });
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
133 ~ .map(|filter| {
134 | filter.enabled = enabled;
135 |
136 ~ filter
|
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:108:26
|
108 | <BlockingEnabled />
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 ~ <html! {
109 + <>
110 + <div class="md:flex md:justify-between md:space-x-5">
111 + <div class="pt-1.5">
112 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
113 + class=" mt-3 ml-3 inline pulsating-circle"></div>
114 + </h1>
115 + </div>
116 + <div
117 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
118 + <SaveCaCertificate />
119 + <BlockingEnabled />
120 + </div>
121 + </div>
122 +
123 + <dl
124 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
125 + <div class="px-4 py-5 sm:p-6">
126 + <dt class="text-base font-normal text-gray-900">
127 + {"Proxied requests"}
128 + </dt>
129 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
130 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
131 + { some_or_loading(self.message.proxied_requests) }
132 + </div>
133 + </dd>
134 + </div>
135 +
136 + <div class="px-4 py-5 sm:p-6">
137 + <dt class="text-base font-normal text-gray-900">
138 + {"Blocked requests"}
139 + </dt>
140 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
141 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
142 + { some_or_loading(self.message.blocked_requests) }
143 + </div>
144 + </dd>
145 + </div>
146 +
147 + <div class="px-4 py-5 sm:p-6">
148 + <dt class="text-base font-normal text-gray-900">
149 + {"Modified responses"}
150 + </dt>
151 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
152 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
153 + { some_or_loading(self.message.modified_responses) }
154 + </div>
155 + </dd>
156 + </div>
157 + </dl>
158 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
159 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
160 + <div class="px-4 py-5 sm:px-6">
161 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
162 + </div>
163 + <div class="px-4 py-5 sm:p-6">
164 + <ol role="list" class="divide-y divide-gray-200">
165 + { for self.message.top_blocked_paths.iter().map(|(path,
166 + count)|render_list_element(path, *count)) }
167 + </ol>
168 +
169 + </div>
170 + </div>
171 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
172 + <div class="px-4 py-5 sm:px-6">
173 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
174 + </div>
175 + <div class="px-4 py-5 sm:p-6">
176 + <ol role="list" class="divide-y divide-gray-200">
177 + { for self.message.top_clients.iter().map(|(client,
178 + count)|render_list_element(client, *count)) }
179 + </ol>
180 + </div>
181 + </div>
182 + </div>
183 + </>
184 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | <() />
| ~~
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L107
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:107:22
|
107 | <SaveCaCertificate />
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
107 ~ <html! {
108 + <>
109 + <div class="md:flex md:justify-between md:space-x-5">
110 + <div class="pt-1.5">
111 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
112 + class=" mt-3 ml-3 inline pulsating-circle"></div>
113 + </h1>
114 + </div>
115 + <div
116 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
117 + <SaveCaCertificate />
118 + <BlockingEnabled />
119 + </div>
120 + </div>
121 +
122 + <dl
123 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
124 + <div class="px-4 py-5 sm:p-6">
125 + <dt class="text-base font-normal text-gray-900">
126 + {"Proxied requests"}
127 + </dt>
128 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
129 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
130 + { some_or_loading(self.message.proxied_requests) }
131 + </div>
132 + </dd>
133 + </div>
134 +
135 + <div class="px-4 py-5 sm:p-6">
136 + <dt class="text-base font-normal text-gray-900">
137 + {"Blocked requests"}
138 + </dt>
139 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
140 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
141 + { some_or_loading(self.message.blocked_requests) }
142 + </div>
143 + </dd>
144 + </div>
145 +
146 + <div class="px-4 py-5 sm:p-6">
147 + <dt class="text-base font-normal text-gray-900">
148 + {"Modified responses"}
149 + </dt>
150 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
151 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
152 + { some_or_loading(self.message.modified_responses) }
153 + </div>
154 + </dd>
155 + </div>
156 + </dl>
157 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
158 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
159 + <div class="px-4 py-5 sm:px-6">
160 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
161 + </div>
162 + <div class="px-4 py-5 sm:p-6">
163 + <ol role="list" class="divide-y divide-gray-200">
164 + { for self.message.top_blocked_paths.iter().map(|(path,
165 + count)|render_list_element(path, *count)) }
166 + </ol>
167 +
168 + </div>
169 + </div>
170 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
171 + <div class="px-4 py-5 sm:px-6">
172 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
173 + </div>
174 + <div class="px-4 py-5 sm:p-6">
175 + <ol role="list" class="divide-y divide-gray-200">
176 + { for self.message.top_clients.iter().map(|(client,
177 + count)|render_list_element(client, *count)) }
178 + </ol>
179 + </div>
180 + </div>
181 + </div>
182 + </>
183 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
107 | <() />
| ~~
|
variant `Red` is never constructed:
web_frontend/src/submit_banner.rs#L8
warning: variant `Red` is never constructed
--> web_frontend/src/submit_banner.rs:8:5
|
6 | pub enum Color {
| ----- variant in this enum
7 | Green,
8 | Red,
| ^^^
|
= note: `Color` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L112
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:112:39
|
112 | let mut top_clients = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _______________________________________^
113 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L95
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:95:45
|
95 | let mut top_blocked_paths = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _____________________________________________^
96 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L183
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:183:25
|
183 | / style_selectors
184 | | .into_iter()
185 | | .map(|(selector, content)| {
186 | | format!(
... |
191 | | })
192 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:185:30
|
185 | ... .map(|(selector, content)| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:186:33
|
186 | / ... format!(
187 | | ... "{selector} {{ {content} }}",
188 | | ... selector = selector,
189 | | ... content = content.join(";")
190 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L160
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:160:25
|
160 | / blocker_result
161 | | .hidden_selectors
162 | | .into_iter()
163 | | .map(|selector| {
... |
173 | | })
174 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:163:30
|
163 | ... .map(|selector| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:164:33
|
164 | / ... format!(
165 | | ... r#"
166 | | ... {}
167 | | ... {{
... |
171 | | ... selector
172 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default
|
calls to `push` immediately after creation:
privaxy/src/server/proxy/exclusions.rs#L35
warning: calls to `push` immediately after creation
--> privaxy/src/server/proxy/exclusions.rs:35:9
|
35 | / let mut exclusions = Vec::new();
36 | |
37 | | // Apple service exclusions, as defined in : https://support.apple.com/en-us/HT210060
38 | | // > Apple services will fail any connection that uses
... |
73 | | exclusions.push(String::from("devimages-cdn.apple.com"));
74 | | exclusions.push(String::from("download.developer.apple.com"));
| |______________________________________________________________________^ help: consider using the `vec![]` macro: `let exclusions = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
|
the borrowed expression implements the required traits:
privaxy/src/server/blocker_utils.rs#L215
warning: the borrowed expression implements the required traits
--> privaxy/src/server/blocker_utils.rs:215:28
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `utf8string.replace('\r', "")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L19
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:19:5
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ++
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L14
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:14:5
|
14 | /// directory
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
14 | /// directory
| ++
|
field `data` is never read:
privaxy/src/server/blocker_utils.rs#L23
warning: field `data` is never read
--> privaxy/src/server/blocker_utils.rs:23:9
|
20 | pub struct ResourceProperties {
| ------------------ field in this struct
...
23 | pub data: Option<String>,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L217
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:217:22
|
217 | _ => base64::encode(resource_contents),
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L215
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:215:21
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L188
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:188:30
|
188 | content: base64::encode(&script),
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
this let-binding has unit value:
web_frontend/src/main.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/main.rs:108:37
|
108 | html! { <>{navigation} <NotFound /></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 | html! { <>{navigation} <html! { <>{navigation} <NotFound /></> }; /></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | html! { <>{navigation} <() /></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L101
warning: this let-binding has unit value
--> web_frontend/src/main.rs:101:103
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> };::Requests /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Requests /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L97
warning: this let-binding has unit value
--> web_frontend/src/main.rs:97:102
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> }
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> };::Dashboard /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Dashboard /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/settings.rs#L52
warning: this let-binding has unit value
--> web_frontend/src/settings.rs:52:22
|
52 | html! { <Filters />}
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
52 | html! { <html! { <Filters />}; />}
| ~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
52 | html! { <() />}
| ~~
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
web_frontend/src/filters.rs#L127
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> web_frontend/src/filters.rs:127:17
|
127 | / self.filter_configuration
128 | | .as_mut()
129 | | .unwrap()
130 | | .0
... |
136 | | Some(filter)
137 | | });
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
133 ~ .map(|filter| {
134 | filter.enabled = enabled;
135 |
136 ~ filter
|
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:108:26
|
108 | <BlockingEnabled />
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 ~ <html! {
109 + <>
110 + <div class="md:flex md:justify-between md:space-x-5">
111 + <div class="pt-1.5">
112 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
113 + class=" mt-3 ml-3 inline pulsating-circle"></div>
114 + </h1>
115 + </div>
116 + <div
117 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
118 + <SaveCaCertificate />
119 + <BlockingEnabled />
120 + </div>
121 + </div>
122 +
123 + <dl
124 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
125 + <div class="px-4 py-5 sm:p-6">
126 + <dt class="text-base font-normal text-gray-900">
127 + {"Proxied requests"}
128 + </dt>
129 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
130 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
131 + { some_or_loading(self.message.proxied_requests) }
132 + </div>
133 + </dd>
134 + </div>
135 +
136 + <div class="px-4 py-5 sm:p-6">
137 + <dt class="text-base font-normal text-gray-900">
138 + {"Blocked requests"}
139 + </dt>
140 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
141 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
142 + { some_or_loading(self.message.blocked_requests) }
143 + </div>
144 + </dd>
145 + </div>
146 +
147 + <div class="px-4 py-5 sm:p-6">
148 + <dt class="text-base font-normal text-gray-900">
149 + {"Modified responses"}
150 + </dt>
151 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
152 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
153 + { some_or_loading(self.message.modified_responses) }
154 + </div>
155 + </dd>
156 + </div>
157 + </dl>
158 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
159 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
160 + <div class="px-4 py-5 sm:px-6">
161 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
162 + </div>
163 + <div class="px-4 py-5 sm:p-6">
164 + <ol role="list" class="divide-y divide-gray-200">
165 + { for self.message.top_blocked_paths.iter().map(|(path,
166 + count)|render_list_element(path, *count)) }
167 + </ol>
168 +
169 + </div>
170 + </div>
171 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
172 + <div class="px-4 py-5 sm:px-6">
173 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
174 + </div>
175 + <div class="px-4 py-5 sm:p-6">
176 + <ol role="list" class="divide-y divide-gray-200">
177 + { for self.message.top_clients.iter().map(|(client,
178 + count)|render_list_element(client, *count)) }
179 + </ol>
180 + </div>
181 + </div>
182 + </div>
183 + </>
184 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | <() />
| ~~
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L107
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:107:22
|
107 | <SaveCaCertificate />
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
107 ~ <html! {
108 + <>
109 + <div class="md:flex md:justify-between md:space-x-5">
110 + <div class="pt-1.5">
111 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
112 + class=" mt-3 ml-3 inline pulsating-circle"></div>
113 + </h1>
114 + </div>
115 + <div
116 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
117 + <SaveCaCertificate />
118 + <BlockingEnabled />
119 + </div>
120 + </div>
121 +
122 + <dl
123 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
124 + <div class="px-4 py-5 sm:p-6">
125 + <dt class="text-base font-normal text-gray-900">
126 + {"Proxied requests"}
127 + </dt>
128 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
129 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
130 + { some_or_loading(self.message.proxied_requests) }
131 + </div>
132 + </dd>
133 + </div>
134 +
135 + <div class="px-4 py-5 sm:p-6">
136 + <dt class="text-base font-normal text-gray-900">
137 + {"Blocked requests"}
138 + </dt>
139 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
140 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
141 + { some_or_loading(self.message.blocked_requests) }
142 + </div>
143 + </dd>
144 + </div>
145 +
146 + <div class="px-4 py-5 sm:p-6">
147 + <dt class="text-base font-normal text-gray-900">
148 + {"Modified responses"}
149 + </dt>
150 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
151 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
152 + { some_or_loading(self.message.modified_responses) }
153 + </div>
154 + </dd>
155 + </div>
156 + </dl>
157 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
158 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
159 + <div class="px-4 py-5 sm:px-6">
160 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
161 + </div>
162 + <div class="px-4 py-5 sm:p-6">
163 + <ol role="list" class="divide-y divide-gray-200">
164 + { for self.message.top_blocked_paths.iter().map(|(path,
165 + count)|render_list_element(path, *count)) }
166 + </ol>
167 +
168 + </div>
169 + </div>
170 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
171 + <div class="px-4 py-5 sm:px-6">
172 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
173 + </div>
174 + <div class="px-4 py-5 sm:p-6">
175 + <ol role="list" class="divide-y divide-gray-200">
176 + { for self.message.top_clients.iter().map(|(client,
177 + count)|render_list_element(client, *count)) }
178 + </ol>
179 + </div>
180 + </div>
181 + </div>
182 + </>
183 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
107 | <() />
| ~~
|
variant `Red` is never constructed:
web_frontend/src/submit_banner.rs#L8
warning: variant `Red` is never constructed
--> web_frontend/src/submit_banner.rs:8:5
|
6 | pub enum Color {
| ----- variant in this enum
7 | Green,
8 | Red,
| ^^^
|
= note: `Color` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L112
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:112:39
|
112 | let mut top_clients = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _______________________________________^
113 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L95
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:95:45
|
95 | let mut top_blocked_paths = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _____________________________________________^
96 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L183
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:183:25
|
183 | / style_selectors
184 | | .into_iter()
185 | | .map(|(selector, content)| {
186 | | format!(
... |
191 | | })
192 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:185:30
|
185 | ... .map(|(selector, content)| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:186:33
|
186 | / ... format!(
187 | | ... "{selector} {{ {content} }}",
188 | | ... selector = selector,
189 | | ... content = content.join(";")
190 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L160
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:160:25
|
160 | / blocker_result
161 | | .hidden_selectors
162 | | .into_iter()
163 | | .map(|selector| {
... |
173 | | })
174 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:163:30
|
163 | ... .map(|selector| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:164:33
|
164 | / ... format!(
165 | | ... r#"
166 | | ... {}
167 | | ... {{
... |
171 | | ... selector
172 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default
|
calls to `push` immediately after creation:
privaxy/src/server/proxy/exclusions.rs#L35
warning: calls to `push` immediately after creation
--> privaxy/src/server/proxy/exclusions.rs:35:9
|
35 | / let mut exclusions = Vec::new();
36 | |
37 | | // Apple service exclusions, as defined in : https://support.apple.com/en-us/HT210060
38 | | // > Apple services will fail any connection that uses
... |
73 | | exclusions.push(String::from("devimages-cdn.apple.com"));
74 | | exclusions.push(String::from("download.developer.apple.com"));
| |______________________________________________________________________^ help: consider using the `vec![]` macro: `let exclusions = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
|
the borrowed expression implements the required traits:
privaxy/src/server/blocker_utils.rs#L215
warning: the borrowed expression implements the required traits
--> privaxy/src/server/blocker_utils.rs:215:28
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `utf8string.replace('\r', "")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L19
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:19:5
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ++
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L14
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:14:5
|
14 | /// directory
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
14 | /// directory
| ++
|
field `data` is never read:
privaxy/src/server/blocker_utils.rs#L23
warning: field `data` is never read
--> privaxy/src/server/blocker_utils.rs:23:9
|
20 | pub struct ResourceProperties {
| ------------------ field in this struct
...
23 | pub data: Option<String>,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L217
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:217:22
|
217 | _ => base64::encode(resource_contents),
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L215
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:215:21
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L188
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:188:30
|
188 | content: base64::encode(&script),
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
this let-binding has unit value:
web_frontend/src/main.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/main.rs:108:37
|
108 | html! { <>{navigation} <NotFound /></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 | html! { <>{navigation} <html! { <>{navigation} <NotFound /></> }; /></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | html! { <>{navigation} <() /></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L101
warning: this let-binding has unit value
--> web_frontend/src/main.rs:101:103
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> };::Requests /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Requests /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L97
warning: this let-binding has unit value
--> web_frontend/src/main.rs:97:102
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> }
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> };::Dashboard /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Dashboard /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/settings.rs#L52
warning: this let-binding has unit value
--> web_frontend/src/settings.rs:52:22
|
52 | html! { <Filters />}
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
52 | html! { <html! { <Filters />}; />}
| ~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
52 | html! { <() />}
| ~~
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
web_frontend/src/filters.rs#L127
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> web_frontend/src/filters.rs:127:17
|
127 | / self.filter_configuration
128 | | .as_mut()
129 | | .unwrap()
130 | | .0
... |
136 | | Some(filter)
137 | | });
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
133 ~ .map(|filter| {
134 | filter.enabled = enabled;
135 |
136 ~ filter
|
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:108:26
|
108 | <BlockingEnabled />
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 ~ <html! {
109 + <>
110 + <div class="md:flex md:justify-between md:space-x-5">
111 + <div class="pt-1.5">
112 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
113 + class=" mt-3 ml-3 inline pulsating-circle"></div>
114 + </h1>
115 + </div>
116 + <div
117 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
118 + <SaveCaCertificate />
119 + <BlockingEnabled />
120 + </div>
121 + </div>
122 +
123 + <dl
124 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
125 + <div class="px-4 py-5 sm:p-6">
126 + <dt class="text-base font-normal text-gray-900">
127 + {"Proxied requests"}
128 + </dt>
129 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
130 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
131 + { some_or_loading(self.message.proxied_requests) }
132 + </div>
133 + </dd>
134 + </div>
135 +
136 + <div class="px-4 py-5 sm:p-6">
137 + <dt class="text-base font-normal text-gray-900">
138 + {"Blocked requests"}
139 + </dt>
140 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
141 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
142 + { some_or_loading(self.message.blocked_requests) }
143 + </div>
144 + </dd>
145 + </div>
146 +
147 + <div class="px-4 py-5 sm:p-6">
148 + <dt class="text-base font-normal text-gray-900">
149 + {"Modified responses"}
150 + </dt>
151 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
152 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
153 + { some_or_loading(self.message.modified_responses) }
154 + </div>
155 + </dd>
156 + </div>
157 + </dl>
158 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
159 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
160 + <div class="px-4 py-5 sm:px-6">
161 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
162 + </div>
163 + <div class="px-4 py-5 sm:p-6">
164 + <ol role="list" class="divide-y divide-gray-200">
165 + { for self.message.top_blocked_paths.iter().map(|(path,
166 + count)|render_list_element(path, *count)) }
167 + </ol>
168 +
169 + </div>
170 + </div>
171 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
172 + <div class="px-4 py-5 sm:px-6">
173 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
174 + </div>
175 + <div class="px-4 py-5 sm:p-6">
176 + <ol role="list" class="divide-y divide-gray-200">
177 + { for self.message.top_clients.iter().map(|(client,
178 + count)|render_list_element(client, *count)) }
179 + </ol>
180 + </div>
181 + </div>
182 + </div>
183 + </>
184 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | <() />
| ~~
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L107
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:107:22
|
107 | <SaveCaCertificate />
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
107 ~ <html! {
108 + <>
109 + <div class="md:flex md:justify-between md:space-x-5">
110 + <div class="pt-1.5">
111 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
112 + class=" mt-3 ml-3 inline pulsating-circle"></div>
113 + </h1>
114 + </div>
115 + <div
116 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
117 + <SaveCaCertificate />
118 + <BlockingEnabled />
119 + </div>
120 + </div>
121 +
122 + <dl
123 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
124 + <div class="px-4 py-5 sm:p-6">
125 + <dt class="text-base font-normal text-gray-900">
126 + {"Proxied requests"}
127 + </dt>
128 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
129 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
130 + { some_or_loading(self.message.proxied_requests) }
131 + </div>
132 + </dd>
133 + </div>
134 +
135 + <div class="px-4 py-5 sm:p-6">
136 + <dt class="text-base font-normal text-gray-900">
137 + {"Blocked requests"}
138 + </dt>
139 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
140 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
141 + { some_or_loading(self.message.blocked_requests) }
142 + </div>
143 + </dd>
144 + </div>
145 +
146 + <div class="px-4 py-5 sm:p-6">
147 + <dt class="text-base font-normal text-gray-900">
148 + {"Modified responses"}
149 + </dt>
150 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
151 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
152 + { some_or_loading(self.message.modified_responses) }
153 + </div>
154 + </dd>
155 + </div>
156 + </dl>
157 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
158 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
159 + <div class="px-4 py-5 sm:px-6">
160 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
161 + </div>
162 + <div class="px-4 py-5 sm:p-6">
163 + <ol role="list" class="divide-y divide-gray-200">
164 + { for self.message.top_blocked_paths.iter().map(|(path,
165 + count)|render_list_element(path, *count)) }
166 + </ol>
167 +
168 + </div>
169 + </div>
170 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
171 + <div class="px-4 py-5 sm:px-6">
172 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
173 + </div>
174 + <div class="px-4 py-5 sm:p-6">
175 + <ol role="list" class="divide-y divide-gray-200">
176 + { for self.message.top_clients.iter().map(|(client,
177 + count)|render_list_element(client, *count)) }
178 + </ol>
179 + </div>
180 + </div>
181 + </div>
182 + </>
183 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
107 | <() />
| ~~
|
variant `Red` is never constructed:
web_frontend/src/submit_banner.rs#L8
warning: variant `Red` is never constructed
--> web_frontend/src/submit_banner.rs:8:5
|
6 | pub enum Color {
| ----- variant in this enum
7 | Green,
8 | Red,
| ^^^
|
= note: `Color` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L112
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:112:39
|
112 | let mut top_clients = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _______________________________________^
113 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L95
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:95:45
|
95 | let mut top_blocked_paths = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _____________________________________________^
96 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L183
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:183:25
|
183 | / style_selectors
184 | | .into_iter()
185 | | .map(|(selector, content)| {
186 | | format!(
... |
191 | | })
192 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:185:30
|
185 | ... .map(|(selector, content)| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:186:33
|
186 | / ... format!(
187 | | ... "{selector} {{ {content} }}",
188 | | ... selector = selector,
189 | | ... content = content.join(";")
190 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L160
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:160:25
|
160 | / blocker_result
161 | | .hidden_selectors
162 | | .into_iter()
163 | | .map(|selector| {
... |
173 | | })
174 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:163:30
|
163 | ... .map(|selector| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:164:33
|
164 | / ... format!(
165 | | ... r#"
166 | | ... {}
167 | | ... {{
... |
171 | | ... selector
172 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default
|
calls to `push` immediately after creation:
privaxy/src/server/proxy/exclusions.rs#L35
warning: calls to `push` immediately after creation
--> privaxy/src/server/proxy/exclusions.rs:35:9
|
35 | / let mut exclusions = Vec::new();
36 | |
37 | | // Apple service exclusions, as defined in : https://support.apple.com/en-us/HT210060
38 | | // > Apple services will fail any connection that uses
... |
73 | | exclusions.push(String::from("devimages-cdn.apple.com"));
74 | | exclusions.push(String::from("download.developer.apple.com"));
| |______________________________________________________________________^ help: consider using the `vec![]` macro: `let exclusions = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
|
the borrowed expression implements the required traits:
privaxy/src/server/blocker_utils.rs#L215
warning: the borrowed expression implements the required traits
--> privaxy/src/server/blocker_utils.rs:215:28
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `utf8string.replace('\r', "")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L19
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:19:5
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ++
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L14
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:14:5
|
14 | /// directory
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
14 | /// directory
| ++
|
field `data` is never read:
privaxy/src/server/blocker_utils.rs#L23
warning: field `data` is never read
--> privaxy/src/server/blocker_utils.rs:23:9
|
20 | pub struct ResourceProperties {
| ------------------ field in this struct
...
23 | pub data: Option<String>,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L217
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:217:22
|
217 | _ => base64::encode(resource_contents),
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L215
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:215:21
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L188
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:188:30
|
188 | content: base64::encode(&script),
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
this let-binding has unit value:
web_frontend/src/main.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/main.rs:108:37
|
108 | html! { <>{navigation} <NotFound /></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 | html! { <>{navigation} <html! { <>{navigation} <NotFound /></> }; /></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | html! { <>{navigation} <() /></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L101
warning: this let-binding has unit value
--> web_frontend/src/main.rs:101:103
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> };::Requests /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Requests /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L97
warning: this let-binding has unit value
--> web_frontend/src/main.rs:97:102
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> }
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> };::Dashboard /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Dashboard /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/settings.rs#L52
warning: this let-binding has unit value
--> web_frontend/src/settings.rs:52:22
|
52 | html! { <Filters />}
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
52 | html! { <html! { <Filters />}; />}
| ~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
52 | html! { <() />}
| ~~
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
web_frontend/src/filters.rs#L127
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> web_frontend/src/filters.rs:127:17
|
127 | / self.filter_configuration
128 | | .as_mut()
129 | | .unwrap()
130 | | .0
... |
136 | | Some(filter)
137 | | });
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
133 ~ .map(|filter| {
134 | filter.enabled = enabled;
135 |
136 ~ filter
|
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:108:26
|
108 | <BlockingEnabled />
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 ~ <html! {
109 + <>
110 + <div class="md:flex md:justify-between md:space-x-5">
111 + <div class="pt-1.5">
112 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
113 + class=" mt-3 ml-3 inline pulsating-circle"></div>
114 + </h1>
115 + </div>
116 + <div
117 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
118 + <SaveCaCertificate />
119 + <BlockingEnabled />
120 + </div>
121 + </div>
122 +
123 + <dl
124 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
125 + <div class="px-4 py-5 sm:p-6">
126 + <dt class="text-base font-normal text-gray-900">
127 + {"Proxied requests"}
128 + </dt>
129 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
130 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
131 + { some_or_loading(self.message.proxied_requests) }
132 + </div>
133 + </dd>
134 + </div>
135 +
136 + <div class="px-4 py-5 sm:p-6">
137 + <dt class="text-base font-normal text-gray-900">
138 + {"Blocked requests"}
139 + </dt>
140 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
141 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
142 + { some_or_loading(self.message.blocked_requests) }
143 + </div>
144 + </dd>
145 + </div>
146 +
147 + <div class="px-4 py-5 sm:p-6">
148 + <dt class="text-base font-normal text-gray-900">
149 + {"Modified responses"}
150 + </dt>
151 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
152 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
153 + { some_or_loading(self.message.modified_responses) }
154 + </div>
155 + </dd>
156 + </div>
157 + </dl>
158 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
159 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
160 + <div class="px-4 py-5 sm:px-6">
161 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
162 + </div>
163 + <div class="px-4 py-5 sm:p-6">
164 + <ol role="list" class="divide-y divide-gray-200">
165 + { for self.message.top_blocked_paths.iter().map(|(path,
166 + count)|render_list_element(path, *count)) }
167 + </ol>
168 +
169 + </div>
170 + </div>
171 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
172 + <div class="px-4 py-5 sm:px-6">
173 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
174 + </div>
175 + <div class="px-4 py-5 sm:p-6">
176 + <ol role="list" class="divide-y divide-gray-200">
177 + { for self.message.top_clients.iter().map(|(client,
178 + count)|render_list_element(client, *count)) }
179 + </ol>
180 + </div>
181 + </div>
182 + </div>
183 + </>
184 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | <() />
| ~~
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L107
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:107:22
|
107 | <SaveCaCertificate />
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
107 ~ <html! {
108 + <>
109 + <div class="md:flex md:justify-between md:space-x-5">
110 + <div class="pt-1.5">
111 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
112 + class=" mt-3 ml-3 inline pulsating-circle"></div>
113 + </h1>
114 + </div>
115 + <div
116 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
117 + <SaveCaCertificate />
118 + <BlockingEnabled />
119 + </div>
120 + </div>
121 +
122 + <dl
123 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
124 + <div class="px-4 py-5 sm:p-6">
125 + <dt class="text-base font-normal text-gray-900">
126 + {"Proxied requests"}
127 + </dt>
128 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
129 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
130 + { some_or_loading(self.message.proxied_requests) }
131 + </div>
132 + </dd>
133 + </div>
134 +
135 + <div class="px-4 py-5 sm:p-6">
136 + <dt class="text-base font-normal text-gray-900">
137 + {"Blocked requests"}
138 + </dt>
139 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
140 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
141 + { some_or_loading(self.message.blocked_requests) }
142 + </div>
143 + </dd>
144 + </div>
145 +
146 + <div class="px-4 py-5 sm:p-6">
147 + <dt class="text-base font-normal text-gray-900">
148 + {"Modified responses"}
149 + </dt>
150 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
151 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
152 + { some_or_loading(self.message.modified_responses) }
153 + </div>
154 + </dd>
155 + </div>
156 + </dl>
157 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
158 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
159 + <div class="px-4 py-5 sm:px-6">
160 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
161 + </div>
162 + <div class="px-4 py-5 sm:p-6">
163 + <ol role="list" class="divide-y divide-gray-200">
164 + { for self.message.top_blocked_paths.iter().map(|(path,
165 + count)|render_list_element(path, *count)) }
166 + </ol>
167 +
168 + </div>
169 + </div>
170 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
171 + <div class="px-4 py-5 sm:px-6">
172 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
173 + </div>
174 + <div class="px-4 py-5 sm:p-6">
175 + <ol role="list" class="divide-y divide-gray-200">
176 + { for self.message.top_clients.iter().map(|(client,
177 + count)|render_list_element(client, *count)) }
178 + </ol>
179 + </div>
180 + </div>
181 + </div>
182 + </>
183 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
107 | <() />
| ~~
|
variant `Red` is never constructed:
web_frontend/src/submit_banner.rs#L8
warning: variant `Red` is never constructed
--> web_frontend/src/submit_banner.rs:8:5
|
6 | pub enum Color {
| ----- variant in this enum
7 | Green,
8 | Red,
| ^^^
|
= note: `Color` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L112
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:112:39
|
112 | let mut top_clients = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _______________________________________^
113 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L95
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:95:45
|
95 | let mut top_blocked_paths = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _____________________________________________^
96 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L183
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:183:25
|
183 | / style_selectors
184 | | .into_iter()
185 | | .map(|(selector, content)| {
186 | | format!(
... |
191 | | })
192 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:185:30
|
185 | ... .map(|(selector, content)| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:186:33
|
186 | / ... format!(
187 | | ... "{selector} {{ {content} }}",
188 | | ... selector = selector,
189 | | ... content = content.join(";")
190 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L160
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:160:25
|
160 | / blocker_result
161 | | .hidden_selectors
162 | | .into_iter()
163 | | .map(|selector| {
... |
173 | | })
174 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:163:30
|
163 | ... .map(|selector| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:164:33
|
164 | / ... format!(
165 | | ... r#"
166 | | ... {}
167 | | ... {{
... |
171 | | ... selector
172 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default
|
calls to `push` immediately after creation:
privaxy/src/server/proxy/exclusions.rs#L35
warning: calls to `push` immediately after creation
--> privaxy/src/server/proxy/exclusions.rs:35:9
|
35 | / let mut exclusions = Vec::new();
36 | |
37 | | // Apple service exclusions, as defined in : https://support.apple.com/en-us/HT210060
38 | | // > Apple services will fail any connection that uses
... |
73 | | exclusions.push(String::from("devimages-cdn.apple.com"));
74 | | exclusions.push(String::from("download.developer.apple.com"));
| |______________________________________________________________________^ help: consider using the `vec![]` macro: `let exclusions = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
|
the borrowed expression implements the required traits:
privaxy/src/server/blocker_utils.rs#L215
warning: the borrowed expression implements the required traits
--> privaxy/src/server/blocker_utils.rs:215:28
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `utf8string.replace('\r', "")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L19
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:19:5
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ++
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L14
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:14:5
|
14 | /// directory
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
14 | /// directory
| ++
|
field `data` is never read:
privaxy/src/server/blocker_utils.rs#L23
warning: field `data` is never read
--> privaxy/src/server/blocker_utils.rs:23:9
|
20 | pub struct ResourceProperties {
| ------------------ field in this struct
...
23 | pub data: Option<String>,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L217
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:217:22
|
217 | _ => base64::encode(resource_contents),
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L215
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:215:21
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L188
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:188:30
|
188 | content: base64::encode(&script),
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
this let-binding has unit value:
web_frontend/src/main.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/main.rs:108:37
|
108 | html! { <>{navigation} <NotFound /></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 | html! { <>{navigation} <html! { <>{navigation} <NotFound /></> }; /></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | html! { <>{navigation} <() /></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L101
warning: this let-binding has unit value
--> web_frontend/src/main.rs:101:103
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> };::Requests /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Requests /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L97
warning: this let-binding has unit value
--> web_frontend/src/main.rs:97:102
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> }
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> };::Dashboard /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Dashboard /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/settings.rs#L52
warning: this let-binding has unit value
--> web_frontend/src/settings.rs:52:22
|
52 | html! { <Filters />}
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
52 | html! { <html! { <Filters />}; />}
| ~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
52 | html! { <() />}
| ~~
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
web_frontend/src/filters.rs#L127
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> web_frontend/src/filters.rs:127:17
|
127 | / self.filter_configuration
128 | | .as_mut()
129 | | .unwrap()
130 | | .0
... |
136 | | Some(filter)
137 | | });
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: use `map` instead
|
133 ~ .map(|filter| {
134 | filter.enabled = enabled;
135 |
136 ~ filter
|
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:108:26
|
108 | <BlockingEnabled />
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 ~ <html! {
109 + <>
110 + <div class="md:flex md:justify-between md:space-x-5">
111 + <div class="pt-1.5">
112 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
113 + class=" mt-3 ml-3 inline pulsating-circle"></div>
114 + </h1>
115 + </div>
116 + <div
117 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
118 + <SaveCaCertificate />
119 + <BlockingEnabled />
120 + </div>
121 + </div>
122 +
123 + <dl
124 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
125 + <div class="px-4 py-5 sm:p-6">
126 + <dt class="text-base font-normal text-gray-900">
127 + {"Proxied requests"}
128 + </dt>
129 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
130 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
131 + { some_or_loading(self.message.proxied_requests) }
132 + </div>
133 + </dd>
134 + </div>
135 +
136 + <div class="px-4 py-5 sm:p-6">
137 + <dt class="text-base font-normal text-gray-900">
138 + {"Blocked requests"}
139 + </dt>
140 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
141 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
142 + { some_or_loading(self.message.blocked_requests) }
143 + </div>
144 + </dd>
145 + </div>
146 +
147 + <div class="px-4 py-5 sm:p-6">
148 + <dt class="text-base font-normal text-gray-900">
149 + {"Modified responses"}
150 + </dt>
151 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
152 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
153 + { some_or_loading(self.message.modified_responses) }
154 + </div>
155 + </dd>
156 + </div>
157 + </dl>
158 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
159 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
160 + <div class="px-4 py-5 sm:px-6">
161 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
162 + </div>
163 + <div class="px-4 py-5 sm:p-6">
164 + <ol role="list" class="divide-y divide-gray-200">
165 + { for self.message.top_blocked_paths.iter().map(|(path,
166 + count)|render_list_element(path, *count)) }
167 + </ol>
168 +
169 + </div>
170 + </div>
171 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
172 + <div class="px-4 py-5 sm:px-6">
173 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
174 + </div>
175 + <div class="px-4 py-5 sm:p-6">
176 + <ol role="list" class="divide-y divide-gray-200">
177 + { for self.message.top_clients.iter().map(|(client,
178 + count)|render_list_element(client, *count)) }
179 + </ol>
180 + </div>
181 + </div>
182 + </div>
183 + </>
184 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | <() />
| ~~
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L107
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:107:22
|
107 | <SaveCaCertificate />
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
107 ~ <html! {
108 + <>
109 + <div class="md:flex md:justify-between md:space-x-5">
110 + <div class="pt-1.5">
111 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
112 + class=" mt-3 ml-3 inline pulsating-circle"></div>
113 + </h1>
114 + </div>
115 + <div
116 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
117 + <SaveCaCertificate />
118 + <BlockingEnabled />
119 + </div>
120 + </div>
121 +
122 + <dl
123 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
124 + <div class="px-4 py-5 sm:p-6">
125 + <dt class="text-base font-normal text-gray-900">
126 + {"Proxied requests"}
127 + </dt>
128 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
129 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
130 + { some_or_loading(self.message.proxied_requests) }
131 + </div>
132 + </dd>
133 + </div>
134 +
135 + <div class="px-4 py-5 sm:p-6">
136 + <dt class="text-base font-normal text-gray-900">
137 + {"Blocked requests"}
138 + </dt>
139 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
140 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
141 + { some_or_loading(self.message.blocked_requests) }
142 + </div>
143 + </dd>
144 + </div>
145 +
146 + <div class="px-4 py-5 sm:p-6">
147 + <dt class="text-base font-normal text-gray-900">
148 + {"Modified responses"}
149 + </dt>
150 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
151 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
152 + { some_or_loading(self.message.modified_responses) }
153 + </div>
154 + </dd>
155 + </div>
156 + </dl>
157 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
158 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
159 + <div class="px-4 py-5 sm:px-6">
160 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
161 + </div>
162 + <div class="px-4 py-5 sm:p-6">
163 + <ol role="list" class="divide-y divide-gray-200">
164 + { for self.message.top_blocked_paths.iter().map(|(path,
165 + count)|render_list_element(path, *count)) }
166 + </ol>
167 +
168 + </div>
169 + </div>
170 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
171 + <div class="px-4 py-5 sm:px-6">
172 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
173 + </div>
174 + <div class="px-4 py-5 sm:p-6">
175 + <ol role="list" class="divide-y divide-gray-200">
176 + { for self.message.top_clients.iter().map(|(client,
177 + count)|render_list_element(client, *count)) }
178 + </ol>
179 + </div>
180 + </div>
181 + </div>
182 + </>
183 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
107 | <() />
| ~~
|
variant `Red` is never constructed:
web_frontend/src/submit_banner.rs#L8
warning: variant `Red` is never constructed
--> web_frontend/src/submit_banner.rs:8:5
|
6 | pub enum Color {
| ----- variant in this enum
7 | Green,
8 | Red,
| ^^^
|
= note: `Color` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L112
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:112:39
|
112 | let mut top_clients = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _______________________________________^
113 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L95
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:95:45
|
95 | let mut top_blocked_paths = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _____________________________________________^
96 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L183
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:183:25
|
183 | / style_selectors
184 | | .into_iter()
185 | | .map(|(selector, content)| {
186 | | format!(
... |
191 | | })
192 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:185:30
|
185 | ... .map(|(selector, content)| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:186:33
|
186 | / ... format!(
187 | | ... "{selector} {{ {content} }}",
188 | | ... selector = selector,
189 | | ... content = content.join(";")
190 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L160
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:160:25
|
160 | / blocker_result
161 | | .hidden_selectors
162 | | .into_iter()
163 | | .map(|selector| {
... |
173 | | })
174 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:163:30
|
163 | ... .map(|selector| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:164:33
|
164 | / ... format!(
165 | | ... r#"
166 | | ... {}
167 | | ... {{
... |
171 | | ... selector
172 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default
|
calls to `push` immediately after creation:
privaxy/src/server/proxy/exclusions.rs#L35
warning: calls to `push` immediately after creation
--> privaxy/src/server/proxy/exclusions.rs:35:9
|
35 | / let mut exclusions = Vec::new();
36 | |
37 | | // Apple service exclusions, as defined in : https://support.apple.com/en-us/HT210060
38 | | // > Apple services will fail any connection that uses
... |
73 | | exclusions.push(String::from("devimages-cdn.apple.com"));
74 | | exclusions.push(String::from("download.developer.apple.com"));
| |______________________________________________________________________^ help: consider using the `vec![]` macro: `let exclusions = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
|
the borrowed expression implements the required traits:
privaxy/src/server/blocker_utils.rs#L215
warning: the borrowed expression implements the required traits
--> privaxy/src/server/blocker_utils.rs:215:28
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `utf8string.replace('\r', "")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L19
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:19:5
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ++
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L14
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:14:5
|
14 | /// directory
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
14 | /// directory
| ++
|
field `data` is never read:
privaxy/src/server/blocker_utils.rs#L23
warning: field `data` is never read
--> privaxy/src/server/blocker_utils.rs:23:9
|
20 | pub struct ResourceProperties {
| ------------------ field in this struct
...
23 | pub data: Option<String>,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L217
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:217:22
|
217 | _ => base64::encode(resource_contents),
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L215
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:215:21
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L188
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:188:30
|
188 | content: base64::encode(&script),
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
this let-binding has unit value:
web_frontend/src/main.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/main.rs:108:37
|
108 | html! { <>{navigation} <NotFound /></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 | html! { <>{navigation} <html! { <>{navigation} <NotFound /></> }; /></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | html! { <>{navigation} <() /></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L101
warning: this let-binding has unit value
--> web_frontend/src/main.rs:101:103
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> };::Requests /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Requests /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L97
warning: this let-binding has unit value
--> web_frontend/src/main.rs:97:102
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> }
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> };::Dashboard /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Dashboard /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/settings.rs#L52
warning: this let-binding has unit value
--> web_frontend/src/settings.rs:52:22
|
52 | html! { <Filters />}
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
52 | html! { <html! { <Filters />}; />}
| ~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
52 | html! { <() />}
| ~~
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
web_frontend/src/filters.rs#L127
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> web_frontend/src/filters.rs:127:17
|
127 | / self.filter_configuration
128 | | .as_mut()
129 | | .unwrap()
130 | | .0
... |
136 | | Some(filter)
137 | | });
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: use `map` instead
|
133 ~ .map(|filter| {
134 | filter.enabled = enabled;
135 |
136 ~ filter
|
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:108:26
|
108 | <BlockingEnabled />
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 ~ <html! {
109 + <>
110 + <div class="md:flex md:justify-between md:space-x-5">
111 + <div class="pt-1.5">
112 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
113 + class=" mt-3 ml-3 inline pulsating-circle"></div>
114 + </h1>
115 + </div>
116 + <div
117 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
118 + <SaveCaCertificate />
119 + <BlockingEnabled />
120 + </div>
121 + </div>
122 +
123 + <dl
124 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
125 + <div class="px-4 py-5 sm:p-6">
126 + <dt class="text-base font-normal text-gray-900">
127 + {"Proxied requests"}
128 + </dt>
129 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
130 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
131 + { some_or_loading(self.message.proxied_requests) }
132 + </div>
133 + </dd>
134 + </div>
135 +
136 + <div class="px-4 py-5 sm:p-6">
137 + <dt class="text-base font-normal text-gray-900">
138 + {"Blocked requests"}
139 + </dt>
140 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
141 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
142 + { some_or_loading(self.message.blocked_requests) }
143 + </div>
144 + </dd>
145 + </div>
146 +
147 + <div class="px-4 py-5 sm:p-6">
148 + <dt class="text-base font-normal text-gray-900">
149 + {"Modified responses"}
150 + </dt>
151 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
152 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
153 + { some_or_loading(self.message.modified_responses) }
154 + </div>
155 + </dd>
156 + </div>
157 + </dl>
158 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
159 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
160 + <div class="px-4 py-5 sm:px-6">
161 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
162 + </div>
163 + <div class="px-4 py-5 sm:p-6">
164 + <ol role="list" class="divide-y divide-gray-200">
165 + { for self.message.top_blocked_paths.iter().map(|(path,
166 + count)|render_list_element(path, *count)) }
167 + </ol>
168 +
169 + </div>
170 + </div>
171 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
172 + <div class="px-4 py-5 sm:px-6">
173 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
174 + </div>
175 + <div class="px-4 py-5 sm:p-6">
176 + <ol role="list" class="divide-y divide-gray-200">
177 + { for self.message.top_clients.iter().map(|(client,
178 + count)|render_list_element(client, *count)) }
179 + </ol>
180 + </div>
181 + </div>
182 + </div>
183 + </>
184 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | <() />
| ~~
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L107
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:107:22
|
107 | <SaveCaCertificate />
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
107 ~ <html! {
108 + <>
109 + <div class="md:flex md:justify-between md:space-x-5">
110 + <div class="pt-1.5">
111 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
112 + class=" mt-3 ml-3 inline pulsating-circle"></div>
113 + </h1>
114 + </div>
115 + <div
116 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
117 + <SaveCaCertificate />
118 + <BlockingEnabled />
119 + </div>
120 + </div>
121 +
122 + <dl
123 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
124 + <div class="px-4 py-5 sm:p-6">
125 + <dt class="text-base font-normal text-gray-900">
126 + {"Proxied requests"}
127 + </dt>
128 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
129 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
130 + { some_or_loading(self.message.proxied_requests) }
131 + </div>
132 + </dd>
133 + </div>
134 +
135 + <div class="px-4 py-5 sm:p-6">
136 + <dt class="text-base font-normal text-gray-900">
137 + {"Blocked requests"}
138 + </dt>
139 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
140 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
141 + { some_or_loading(self.message.blocked_requests) }
142 + </div>
143 + </dd>
144 + </div>
145 +
146 + <div class="px-4 py-5 sm:p-6">
147 + <dt class="text-base font-normal text-gray-900">
148 + {"Modified responses"}
149 + </dt>
150 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
151 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
152 + { some_or_loading(self.message.modified_responses) }
153 + </div>
154 + </dd>
155 + </div>
156 + </dl>
157 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
158 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
159 + <div class="px-4 py-5 sm:px-6">
160 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
161 + </div>
162 + <div class="px-4 py-5 sm:p-6">
163 + <ol role="list" class="divide-y divide-gray-200">
164 + { for self.message.top_blocked_paths.iter().map(|(path,
165 + count)|render_list_element(path, *count)) }
166 + </ol>
167 +
168 + </div>
169 + </div>
170 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
171 + <div class="px-4 py-5 sm:px-6">
172 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
173 + </div>
174 + <div class="px-4 py-5 sm:p-6">
175 + <ol role="list" class="divide-y divide-gray-200">
176 + { for self.message.top_clients.iter().map(|(client,
177 + count)|render_list_element(client, *count)) }
178 + </ol>
179 + </div>
180 + </div>
181 + </div>
182 + </>
183 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
107 | <() />
| ~~
|
variant `Red` is never constructed:
web_frontend/src/submit_banner.rs#L8
warning: variant `Red` is never constructed
--> web_frontend/src/submit_banner.rs:8:5
|
6 | pub enum Color {
| ----- variant in this enum
7 | Green,
8 | Red,
| ^^^
|
= note: `Color` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L112
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:112:39
|
112 | let mut top_clients = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _______________________________________^
113 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L95
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:95:45
|
95 | let mut top_blocked_paths = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _____________________________________________^
96 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L183
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:183:25
|
183 | / style_selectors
184 | | .into_iter()
185 | | .map(|(selector, content)| {
186 | | format!(
... |
191 | | })
192 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:185:30
|
185 | ... .map(|(selector, content)| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:186:33
|
186 | / ... format!(
187 | | ... "{selector} {{ {content} }}",
188 | | ... selector = selector,
189 | | ... content = content.join(";")
190 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L160
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:160:25
|
160 | / blocker_result
161 | | .hidden_selectors
162 | | .into_iter()
163 | | .map(|selector| {
... |
173 | | })
174 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:163:30
|
163 | ... .map(|selector| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:164:33
|
164 | / ... format!(
165 | | ... r#"
166 | | ... {}
167 | | ... {{
... |
171 | | ... selector
172 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default
|
calls to `push` immediately after creation:
privaxy/src/server/proxy/exclusions.rs#L35
warning: calls to `push` immediately after creation
--> privaxy/src/server/proxy/exclusions.rs:35:9
|
35 | / let mut exclusions = Vec::new();
36 | |
37 | | // Apple service exclusions, as defined in : https://support.apple.com/en-us/HT210060
38 | | // > Apple services will fail any connection that uses
... |
73 | | exclusions.push(String::from("devimages-cdn.apple.com"));
74 | | exclusions.push(String::from("download.developer.apple.com"));
| |______________________________________________________________________^ help: consider using the `vec![]` macro: `let exclusions = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
|
the borrowed expression implements the required traits:
privaxy/src/server/blocker_utils.rs#L215
warning: the borrowed expression implements the required traits
--> privaxy/src/server/blocker_utils.rs:215:28
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `utf8string.replace('\r', "")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L19
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:19:5
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ++
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L14
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:14:5
|
14 | /// directory
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
14 | /// directory
| ++
|
field `data` is never read:
privaxy/src/server/blocker_utils.rs#L23
warning: field `data` is never read
--> privaxy/src/server/blocker_utils.rs:23:9
|
20 | pub struct ResourceProperties {
| ------------------ field in this struct
...
23 | pub data: Option<String>,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L217
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:217:22
|
217 | _ => base64::encode(resource_contents),
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L215
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:215:21
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L188
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:188:30
|
188 | content: base64::encode(&script),
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
this let-binding has unit value:
web_frontend/src/main.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/main.rs:108:37
|
108 | html! { <>{navigation} <NotFound /></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 | html! { <>{navigation} <html! { <>{navigation} <NotFound /></> }; /></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | html! { <>{navigation} <() /></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L101
warning: this let-binding has unit value
--> web_frontend/src/main.rs:101:103
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <requests::Requests /> </div></> };::Requests /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
101 | html! { <>{navigation} <div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Requests /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L97
warning: this let-binding has unit value
--> web_frontend/src/main.rs:97:102
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> }
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> };::Dashboard /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Dashboard /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/settings.rs#L52
warning: this let-binding has unit value
--> web_frontend/src/settings.rs:52:22
|
52 | html! { <Filters />}
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
52 | html! { <html! { <Filters />}; />}
| ~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
52 | html! { <() />}
| ~~
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
web_frontend/src/filters.rs#L127
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> web_frontend/src/filters.rs:127:17
|
127 | / self.filter_configuration
128 | | .as_mut()
129 | | .unwrap()
130 | | .0
... |
136 | | Some(filter)
137 | | });
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: use `map` instead
|
133 ~ .map(|filter| {
134 | filter.enabled = enabled;
135 |
136 ~ filter
|
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:108:26
|
108 | <BlockingEnabled />
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 ~ <html! {
109 + <>
110 + <div class="md:flex md:justify-between md:space-x-5">
111 + <div class="pt-1.5">
112 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
113 + class=" mt-3 ml-3 inline pulsating-circle"></div>
114 + </h1>
115 + </div>
116 + <div
117 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
118 + <SaveCaCertificate />
119 + <BlockingEnabled />
120 + </div>
121 + </div>
122 +
123 + <dl
124 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
125 + <div class="px-4 py-5 sm:p-6">
126 + <dt class="text-base font-normal text-gray-900">
127 + {"Proxied requests"}
128 + </dt>
129 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
130 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
131 + { some_or_loading(self.message.proxied_requests) }
132 + </div>
133 + </dd>
134 + </div>
135 +
136 + <div class="px-4 py-5 sm:p-6">
137 + <dt class="text-base font-normal text-gray-900">
138 + {"Blocked requests"}
139 + </dt>
140 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
141 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
142 + { some_or_loading(self.message.blocked_requests) }
143 + </div>
144 + </dd>
145 + </div>
146 +
147 + <div class="px-4 py-5 sm:p-6">
148 + <dt class="text-base font-normal text-gray-900">
149 + {"Modified responses"}
150 + </dt>
151 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
152 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
153 + { some_or_loading(self.message.modified_responses) }
154 + </div>
155 + </dd>
156 + </div>
157 + </dl>
158 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
159 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
160 + <div class="px-4 py-5 sm:px-6">
161 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
162 + </div>
163 + <div class="px-4 py-5 sm:p-6">
164 + <ol role="list" class="divide-y divide-gray-200">
165 + { for self.message.top_blocked_paths.iter().map(|(path,
166 + count)|render_list_element(path, *count)) }
167 + </ol>
168 +
169 + </div>
170 + </div>
171 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
172 + <div class="px-4 py-5 sm:px-6">
173 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
174 + </div>
175 + <div class="px-4 py-5 sm:p-6">
176 + <ol role="list" class="divide-y divide-gray-200">
177 + { for self.message.top_clients.iter().map(|(client,
178 + count)|render_list_element(client, *count)) }
179 + </ol>
180 + </div>
181 + </div>
182 + </div>
183 + </>
184 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | <() />
| ~~
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L107
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:107:22
|
107 | <SaveCaCertificate />
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
107 ~ <html! {
108 + <>
109 + <div class="md:flex md:justify-between md:space-x-5">
110 + <div class="pt-1.5">
111 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
112 + class=" mt-3 ml-3 inline pulsating-circle"></div>
113 + </h1>
114 + </div>
115 + <div
116 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
117 + <SaveCaCertificate />
118 + <BlockingEnabled />
119 + </div>
120 + </div>
121 +
122 + <dl
123 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
124 + <div class="px-4 py-5 sm:p-6">
125 + <dt class="text-base font-normal text-gray-900">
126 + {"Proxied requests"}
127 + </dt>
128 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
129 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
130 + { some_or_loading(self.message.proxied_requests) }
131 + </div>
132 + </dd>
133 + </div>
134 +
135 + <div class="px-4 py-5 sm:p-6">
136 + <dt class="text-base font-normal text-gray-900">
137 + {"Blocked requests"}
138 + </dt>
139 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
140 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
141 + { some_or_loading(self.message.blocked_requests) }
142 + </div>
143 + </dd>
144 + </div>
145 +
146 + <div class="px-4 py-5 sm:p-6">
147 + <dt class="text-base font-normal text-gray-900">
148 + {"Modified responses"}
149 + </dt>
150 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
151 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
152 + { some_or_loading(self.message.modified_responses) }
153 + </div>
154 + </dd>
155 + </div>
156 + </dl>
157 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
158 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
159 + <div class="px-4 py-5 sm:px-6">
160 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
161 + </div>
162 + <div class="px-4 py-5 sm:p-6">
163 + <ol role="list" class="divide-y divide-gray-200">
164 + { for self.message.top_blocked_paths.iter().map(|(path,
165 + count)|render_list_element(path, *count)) }
166 + </ol>
167 +
168 + </div>
169 + </div>
170 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
171 + <div class="px-4 py-5 sm:px-6">
172 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
173 + </div>
174 + <div class="px-4 py-5 sm:p-6">
175 + <ol role="list" class="divide-y divide-gray-200">
176 + { for self.message.top_clients.iter().map(|(client,
177 + count)|render_list_element(client, *count)) }
178 + </ol>
179 + </div>
180 + </div>
181 + </div>
182 + </>
183 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
107 | <() />
| ~~
|
variant `Red` is never constructed:
web_frontend/src/submit_banner.rs#L8
warning: variant `Red` is never constructed
--> web_frontend/src/submit_banner.rs:8:5
|
6 | pub enum Color {
| ----- variant in this enum
7 | Green,
8 | Red,
| ^^^
|
= note: `Color` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L112
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:112:39
|
112 | let mut top_clients = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _______________________________________^
113 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::RangeInclusive<u8>`:
privaxy/src/server/statistics.rs#L95
warning: useless conversion to the same type: `std::ops::RangeInclusive<u8>`
--> privaxy/src/server/statistics.rs:95:45
|
95 | let mut top_blocked_paths = (0..=ENTRIES_PER_STATISTICS_TABLE)
| _____________________________________________^
96 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(0..=ENTRIES_PER_STATISTICS_TABLE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L183
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:183:25
|
183 | / style_selectors
184 | | .into_iter()
185 | | .map(|(selector, content)| {
186 | | format!(
... |
191 | | })
192 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:185:30
|
185 | ... .map(|(selector, content)| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:186:33
|
186 | / ... format!(
187 | | ... "{selector} {{ {content} }}",
188 | | ... selector = selector,
189 | | ... content = content.join(";")
190 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
|
use of `format!` to build up a string from an iterator:
privaxy/src/server/proxy/html_rewriter.rs#L160
warning: use of `format!` to build up a string from an iterator
--> privaxy/src/server/proxy/html_rewriter.rs:160:25
|
160 | / blocker_result
161 | | .hidden_selectors
162 | | .into_iter()
163 | | .map(|selector| {
... |
173 | | })
174 | | .collect::<String>()
| |________________________________________________^
|
help: call `fold` instead
--> privaxy/src/server/proxy/html_rewriter.rs:163:30
|
163 | ... .map(|selector| {
| ^^^
help: ... and use the `write!` macro here
--> privaxy/src/server/proxy/html_rewriter.rs:164:33
|
164 | / ... format!(
165 | | ... r#"
166 | | ... {}
167 | | ... {{
... |
171 | | ... selector
172 | | ... )
| |_______________________^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default
|
calls to `push` immediately after creation:
privaxy/src/server/proxy/exclusions.rs#L35
warning: calls to `push` immediately after creation
--> privaxy/src/server/proxy/exclusions.rs:35:9
|
35 | / let mut exclusions = Vec::new();
36 | |
37 | | // Apple service exclusions, as defined in : https://support.apple.com/en-us/HT210060
38 | | // > Apple services will fail any connection that uses
... |
73 | | exclusions.push(String::from("devimages-cdn.apple.com"));
74 | | exclusions.push(String::from("download.developer.apple.com"));
| |______________________________________________________________________^ help: consider using the `vec![]` macro: `let exclusions = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
|
the borrowed expression implements the required traits:
privaxy/src/server/blocker_utils.rs#L215
warning: the borrowed expression implements the required traits
--> privaxy/src/server/blocker_utils.rs:215:28
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `utf8string.replace('\r', "")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L19
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:19:5
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
19 | /// uBlock Origin, it's used to prevent text files from being encoded in base64 in a data URL.
| ++
|
doc list item without indentation:
privaxy/src/server/blocker_utils.rs#L14
warning: doc list item without indentation
--> privaxy/src/server/blocker_utils.rs:14:5
|
14 | /// directory
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
14 | /// directory
| ++
|
field `data` is never read:
privaxy/src/server/blocker_utils.rs#L23
warning: field `data` is never read
--> privaxy/src/server/blocker_utils.rs:23:9
|
20 | pub struct ResourceProperties {
| ------------------ field in this struct
...
23 | pub data: Option<String>,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L217
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:217:22
|
217 | _ => base64::encode(resource_contents),
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L215
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:215:21
|
215 | base64::encode(&utf8string.replace('\r', ""))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
privaxy/src/server/blocker_utils.rs#L188
warning: use of deprecated function `base64::encode`: Use Engine::encode
--> privaxy/src/server/blocker_utils.rs:188:30
|
188 | content: base64::encode(&script),
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|
this let-binding has unit value:
web_frontend/src/main.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/main.rs:108:37
|
108 | html! { <>{navigation} <NotFound /></> }
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 | html! { <>{navigation} <html! { <>{navigation} <NotFound /></> }; /></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | html! { <>{navigation} <() /></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/main.rs#L97
warning: this let-binding has unit value
--> web_frontend/src/main.rs:97:102
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> }
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <dashboard::Dashboard /> </div></> };::Dashboard /> </div></> }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
97 | html! { <>{navigation}<div class={"container mt-4 mb-10 mx-auto px-4 sm:px-6 lg:px-8"}> <()::Dashboard /> </div></> }
| ~~
|
this let-binding has unit value:
web_frontend/src/settings.rs#L52
warning: this let-binding has unit value
--> web_frontend/src/settings.rs:52:22
|
52 | html! { <Filters />}
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
52 | html! { <html! { <Filters />}; />}
| ~~~~~~~~~~~~~~~~~~~~~
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
52 | html! { <() />}
| ~~
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
web_frontend/src/filters.rs#L127
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> web_frontend/src/filters.rs:127:17
|
127 | / self.filter_configuration
128 | | .as_mut()
129 | | .unwrap()
130 | | .0
... |
136 | | Some(filter)
137 | | });
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: use `map` instead
|
133 ~ .map(|filter| {
134 | filter.enabled = enabled;
135 |
136 ~ filter
|
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L108
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:108:26
|
108 | <BlockingEnabled />
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
108 ~ <html! {
109 + <>
110 + <div class="md:flex md:justify-between md:space-x-5">
111 + <div class="pt-1.5">
112 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
113 + class=" mt-3 ml-3 inline pulsating-circle"></div>
114 + </h1>
115 + </div>
116 + <div
117 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
118 + <SaveCaCertificate />
119 + <BlockingEnabled />
120 + </div>
121 + </div>
122 +
123 + <dl
124 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
125 + <div class="px-4 py-5 sm:p-6">
126 + <dt class="text-base font-normal text-gray-900">
127 + {"Proxied requests"}
128 + </dt>
129 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
130 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
131 + { some_or_loading(self.message.proxied_requests) }
132 + </div>
133 + </dd>
134 + </div>
135 +
136 + <div class="px-4 py-5 sm:p-6">
137 + <dt class="text-base font-normal text-gray-900">
138 + {"Blocked requests"}
139 + </dt>
140 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
141 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
142 + { some_or_loading(self.message.blocked_requests) }
143 + </div>
144 + </dd>
145 + </div>
146 +
147 + <div class="px-4 py-5 sm:p-6">
148 + <dt class="text-base font-normal text-gray-900">
149 + {"Modified responses"}
150 + </dt>
151 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
152 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
153 + { some_or_loading(self.message.modified_responses) }
154 + </div>
155 + </dd>
156 + </div>
157 + </dl>
158 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
159 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
160 + <div class="px-4 py-5 sm:px-6">
161 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
162 + </div>
163 + <div class="px-4 py-5 sm:p-6">
164 + <ol role="list" class="divide-y divide-gray-200">
165 + { for self.message.top_blocked_paths.iter().map(|(path,
166 + count)|render_list_element(path, *count)) }
167 + </ol>
168 +
169 + </div>
170 + </div>
171 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
172 + <div class="px-4 py-5 sm:px-6">
173 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
174 + </div>
175 + <div class="px-4 py-5 sm:p-6">
176 + <ol role="list" class="divide-y divide-gray-200">
177 + { for self.message.top_clients.iter().map(|(client,
178 + count)|render_list_element(client, *count)) }
179 + </ol>
180 + </div>
181 + </div>
182 + </div>
183 + </>
184 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
108 | <() />
| ~~
|
this let-binding has unit value:
web_frontend/src/dashboard.rs#L107
warning: this let-binding has unit value
--> web_frontend/src/dashboard.rs:107:22
|
107 | <SaveCaCertificate />
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
107 ~ <html! {
108 + <>
109 + <div class="md:flex md:justify-between md:space-x-5">
110 + <div class="pt-1.5">
111 + <h1 class="text-2xl font-bold text-gray-900">{ "Dashboard" }<div
112 + class=" mt-3 ml-3 inline pulsating-circle"></div>
113 + </h1>
114 + </div>
115 + <div
116 + class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
117 + <SaveCaCertificate />
118 + <BlockingEnabled />
119 + </div>
120 + </div>
121 +
122 + <dl
123 + class="mt-5 grid grid-cols-1 rounded-lg bg-white overflow-hidden shadow divide-y divide-gray-200 md:grid-cols-3 md:divide-y-0 md:divide-x">
124 + <div class="px-4 py-5 sm:p-6">
125 + <dt class="text-base font-normal text-gray-900">
126 + {"Proxied requests"}
127 + </dt>
128 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
129 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
130 + { some_or_loading(self.message.proxied_requests) }
131 + </div>
132 + </dd>
133 + </div>
134 +
135 + <div class="px-4 py-5 sm:p-6">
136 + <dt class="text-base font-normal text-gray-900">
137 + {"Blocked requests"}
138 + </dt>
139 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
140 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
141 + { some_or_loading(self.message.blocked_requests) }
142 + </div>
143 + </dd>
144 + </div>
145 +
146 + <div class="px-4 py-5 sm:p-6">
147 + <dt class="text-base font-normal text-gray-900">
148 + {"Modified responses"}
149 + </dt>
150 + <dd class="mt-1 flex justify-between items-baseline md:block lg:flex">
151 + <div class="flex items-baseline text-2xl font-semibold text-blue-600">
152 + { some_or_loading(self.message.modified_responses) }
153 + </div>
154 + </dd>
155 + </div>
156 + </dl>
157 + <div class="mt-4 lg:grid lg:gap-y-4 lg:gap-x-8 lg:grid-cols-2">
158 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
159 + <div class="px-4 py-5 sm:px-6">
160 + <h3 class="text-lg font-medium">{"Top blocked paths"}</h3>
161 + </div>
162 + <div class="px-4 py-5 sm:p-6">
163 + <ol role="list" class="divide-y divide-gray-200">
164 + { for self.message.top_blocked_paths.iter().map(|(path,
165 + count)|render_list_element(path, *count)) }
166 + </ol>
167 +
168 + </div>
169 + </div>
170 + <div class="mt-4 bg-white overflow-hidden shadow rounded-lg divide-y divide-gray-200">
171 + <div class="px-4 py-5 sm:px-6">
172 + <h3 class="text-lg font-medium">{"Top clients"}</h3>
173 + </div>
174 + <div class="px-4 py-5 sm:p-6">
175 + <ol role="list" class="divide-y divide-gray-200">
176 + { for self.message.top_clients.iter().map(|(client,
177 + count)|render_list_element(client, *count)) }
178 + </ol>
179 + </div>
180 + </div>
181 + </div>
182 + </>
183 ~ }; />
|
help: variable `__yew_props` of type `()` can be replaced with explicit `()`
|
107 | <() />
| ~~
|
variant `Red` is never constructed:
web_frontend/src/submit_banner.rs#L8
warning: variant `Red` is never constructed
--> web_frontend/src/submit_banner.rs:8:5
|
6 | pub enum Color {
| ----- variant in this enum
7 | Green,
8 | Red,
| ^^^
|
= note: `Color` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|