Merge pull request 'Added libmedium.ducks.party instance' (#13) from … #76
clippy
13 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 13 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.77.2 (25ef9e3d8 2024-04-09)
- cargo 1.77.2 (e52e36006 2024-03-26)
- clippy 0.1.77 (25ef9e3 2024-04-09)
Annotations
Check warning on line 110 in src/render_html.rs
github-actions / clippy
useless use of `vec!`
warning: useless use of `vec!`
--> src/render_html.rs:106:25
|
106 | let overrides = vec![Override {
| _________________________^
107 | | extension: "cls",
108 | | prefix_langs: vec![("%", "TeX"), ("\\", "TeX")],
109 | | default: "Apex",
110 | | }];
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
106 ~ let overrides = [Override {
107 + extension: "cls",
108 + prefix_langs: vec![("%", "TeX"), ("\\", "TeX")],
109 + default: "Apex",
110 ~ }];
|
Check warning on line 291 in src/proxy.rs
github-actions / clippy
useless use of `vec!`
warning: useless use of `vec!`
--> src/proxy.rs:288:20
|
288 | let urls = vec![
| ____________________^
289 | | "/ftrain/big-data-small-effort-b62607a43a8c",
290 | | "/shawn-shi/rest-api-best-practices-decouple-long-running-tasks-from-http-request-processing-9fab2921ace8",
291 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
288 ~ let urls = ["/ftrain/big-data-small-effort-b62607a43a8c",
289 ~ "/shawn-shi/rest-api-best-practices-decouple-long-running-tasks-from-http-request-processing-9fab2921ace8"];
|
Check warning on line 280 in src/proxy.rs
github-actions / clippy
useless use of `vec!`
warning: useless use of `vec!`
--> src/proxy.rs:275:20
|
275 | let urls = vec![
| ____________________^
276 | | "/@ftrain/big-data-small-effort-b62607a43a8c",
277 | | "/@shawn-shi/rest-api-best-practices-decouple-long-running-tasks-from-http-request-processing-9fab2921ace8",
278 | | "/",
279 | | "/asset/medium/1*LY2ohYsNa9nOV1Clko3zJA.png",
280 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
= note: `#[warn(clippy::useless_vec)]` on by default
help: you can use an array directly
|
275 ~ let urls = ["/@ftrain/big-data-small-effort-b62607a43a8c",
276 + "/@shawn-shi/rest-api-best-practices-decouple-long-running-tasks-from-http-request-processing-9fab2921ace8",
277 + "/",
278 ~ "/asset/medium/1*LY2ohYsNa9nOV1Clko3zJA.png"];
|
github-actions / clippy
you seem to use `.enumerate()` and immediately discard the index
warning: you seem to use `.enumerate()` and immediately discard the index
--> /home/runner/work/libmedium/libmedium/target/debug/build/sailfish-compiler-4236585c78b5674a/out/templates/post-5a698b4e9cb72c49:94:25
|
94 | for (_pindex, p) in paragraphs.iter().enumerate() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index
= note: `#[warn(clippy::unused_enumerate_index)]` on by default
help: remove the `.enumerate()` call
|
94 | for p in paragraphs.iter() {
| ~ ~~~~~~~~~~~~~~~~~
Check warning on line 196 in src/data.rs
github-actions / clippy
accessing first element with `splits.get(0)`
warning: accessing first element with `splits.get(0)`
--> src/data.rs:196:13
|
196 | splits.get(0).unwrap()
| ^^^^^^^^^^^^^ help: try: `splits.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
Check warning on line 37 in src/post.rs
github-actions / clippy
fields `p` and `gists` are never read
warning: fields `p` and `gists` are never read
--> src/post.rs:37:5
|
35 | struct Markup<'a, 'b> {
| ------ fields in this struct
36 | markup: &'a GetPostPostContentBodyModelParagraphsMarkups,
37 | p: &'a GetPostPostContentBodyModelParagraphs,
| ^
38 | pos_type: PostitionType,
39 | gists: &'b Option<Vec<(String, crate::data::GistContent)>>,
| ^^^^^
Check warning on line 37 in src/data.rs
github-actions / clippy
field `cache` is never read
warning: field `cache` is never read
--> src/data.rs:37:5
|
35 | pub struct Data {
| ---- field in this struct
36 | pub client: Client,
37 | cache: Db,
| ^^^^^
|
= note: `Data` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> /home/runner/work/libmedium/libmedium/target/debug/build/sailfish-compiler-4236585c78b5674a/out/templates/post-5a698b4e9cb72c49:62:9
|
62 | let mut open_list = false;
| ----^^^^^^^^^
| |
| help: remove this `mut`
github-actions / clippy
unused variable: `open_list`
warning: unused variable: `open_list`
--> /home/runner/work/libmedium/libmedium/target/debug/build/sailfish-compiler-4236585c78b5674a/out/templates/post-5a698b4e9cb72c49:62:13
|
62 | let mut open_list = false;
| ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_open_list`
Check warning on line 126 in src/proxy.rs
github-actions / clippy
unused variable: `gists`
warning: unused variable: `gists`
--> src/proxy.rs:126:9
|
126 | pub gists: Option<Vec<(String, crate::data::GistContent)>>,
| ^^^^^ help: try ignoring the field: `gists: _`
Check warning on line 125 in src/proxy.rs
github-actions / clippy
unused variable: `id`
warning: unused variable: `id`
--> src/proxy.rs:125:9
|
125 | pub id: String,
| ^^ help: try ignoring the field: `id: _`
|
= note: `#[warn(unused_variables)]` on by default
Check warning on line 225 in src/proxy.rs
github-actions / clippy
use of deprecated method `chrono::TimeZone::timestamp_millis`: use `timestamp_millis_opt()` instead
warning: use of deprecated method `chrono::TimeZone::timestamp_millis`: use `timestamp_millis_opt()` instead
--> src/proxy.rs:225:10
|
225 | .timestamp_millis(post_data.created_at)
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
Check warning on line 204 in src/data.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> src/data.rs:204:13
|
204 | let mut id = Self::get_gist_id(&gist_url).to_owned();
| ----^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default