-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hey folks. Non-rust user here. Getting my dev environment set up and noticed some warnings when running cargo install.
May or may not be an issue, just wanted to bring it up in case it's gone unnoticed.
Output after Compiling tera v1.17.0 :
warning: named argument `file` is not used by name
--> create-rust-app_cli/src/qsync/processor.rs:663:29
|
663 | println!("• {:#?}", file = unprocessed_file);
| ----- ^^^^ this named argument is referred to by position in formatting string
| |
| this formatting argument uses named argument `file` by position
|
= note: `#[warn(named_arguments_used_positionally)]` on by default
help: use the named argument by name to avoid ambiguity
|
663 | println!("• {file:#?}", file = unprocessed_file);
| ++++
Compiling aws-sig-auth v0.8.0
Compiling aws-endpoint v0.8.0
Compiling aws-http v0.8.0
Compiling log4rs v1.2.0
Compiling aws-sdk-sso v0.8.0
Compiling aws-sdk-sts v0.8.0
Compiling aws-sdk-s3 v0.8.0
warning: fields `plugin_dev`, `plugin_container`, and `plugin_graphql` are never read
--> create-rust-app_cli/src/plugins/mod.rs:17:9
|
13 | pub struct InstallConfig {
| ------------- fields in this struct
...
17 | pub plugin_dev: bool,
| ^^^^^^^^^^
18 | pub plugin_auth: bool,
19 | pub plugin_container: bool,
| ^^^^^^^^^^^^^^^^
20 | pub plugin_storage: bool,
21 | pub plugin_graphql: bool,
| ^^^^^^^^^^^^^^
|
= note: `InstallConfig` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
warning: call to `.clone()` on a reference in this situation does nothing
--> create-rust-app_cli/src/content/project.rs:129:24
|
129 | let path = file.clone().to_str().unwrap().to_string();
| ^^^^^^^^
|
= note: the type `std::path::Path` does not implement `Clone`, so calling `clone` on `&std::path::Path` copies the reference, which does not do anything and can be removed
= note: `#[warn(noop_method_call)]` on by default
help: remove this redundant call
|
129 - let path = file.clone().to_str().unwrap().to_string();
129 + let path = file.to_str().unwrap().to_string();
|
warning: call to `.clone()` on a reference in this situation does nothing
--> create-rust-app_cli/src/content/project.rs:176:24
|
176 | let path = file.clone().to_str().unwrap().to_string();
| ^^^^^^^^
|
= note: the type `std::path::Path` does not implement `Clone`, so calling `clone` on `&std::path::Path` copies the reference, which does not do anything and can be removed
help: remove this redundant call
|
176 - let path = file.clone().to_str().unwrap().to_string();
176 + let path = file.to_str().unwrap().to_string();
|
Compiling diesel v2.0.0-rc.1
Compiling aws-config v0.8.0
Compiling diesel_migrations v2.0.0-rc.1
Compiling actix-web v4.0.1
Compiling actix-files v0.6.0
Compiling actix-web-httpauth v0.6.0
Compiling actix-multipart v0.4.0
Compiling create-rust-app v8.1.1 (/mnt/d/linux-repos/Quizstuff/create-rust-app/create-rust-app)
warning: unused import: `MyQueryResult`
--> create-rust-app/src/dev/endpoints/service_actixweb.rs:4:44
|
4 | dev::controller::{HealthCheckResponse, MyQueryResult, MySqlQuery},
| ^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `aws_sdk_s3::types::SdkError::*`
--> create-rust-app/src/storage/mod.rs:8:5
|
8 | use aws_sdk_s3::types::SdkError::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `base64`
--> create-rust-app/src/storage/mod.rs:12:5
|
12 | use base64;
| ^^^^^^
warning: unused import: `DatabaseErrorKind`
--> create-rust-app/src/storage/attachment.rs:1:22
|
1 | use diesel::result::{DatabaseErrorKind, Error};
| ^^^^^^^^^^^^^^^^^
warning: unused import: `std::sync::Arc`
--> create-rust-app/src/storage/attachment.rs:6:5
|
6 | use std::sync::Arc;
| ^^^^^^^^^^^^^^
warning: unused import: `Pool`
--> create-rust-app/src/storage/attachment.rs:12:25
|
12 | use crate::{Connection, Pool};
| ^^^^
warning: unused variable: `req`
--> create-rust-app/src/util/actix_web_utils.rs:24:5
|
24 | req: HttpRequest,
| ^^^ help: if this is intentional, prefix it with an underscore: `_req`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `t`
--> create-rust-app/src/dev/endpoints/service_actixweb.rs:18:13
|
18 | Err(t) => HttpResponse::InternalServerError().finish(),
| ^ help: if this is intentional, prefix it with an underscore: `_t`
warning: unused variable: `content_md5`
--> create-rust-app/src/storage/mod.rs:123:9
|
123 | content_md5: String,
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_content_md5`
warning: unused variable: `err`
--> create-rust-app/src/storage/attachment.rs:75:91
|
75 | Attachment::detach(db, &storage, existing.unwrap().id).await.map_err(|err| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_err`
warning: fields `file`, `dynamicImports`, `css`, `isEntry`, and `isDynamicEntry` are never read
--> create-rust-app/src/util/template_utils.rs:125:5
|
123 | pub struct ViteManifestEntry {
| ----------------- fields in this struct
124 | /// Script content to load for this entry
125 | file: String,
| ^^^^
...
128 | dynamicImports: Option<Vec<String>>, // using `import(..)`
| ^^^^^^^^^^^^^^
...
131 | css: Option<Vec<String>>, // using import '*.css'
| ^^^
...
134 | isEntry: Option<bool>,
| ^^^^^^^
...
137 | isDynamicEntry: Option<bool>, // src: String, /* => not necessary :) */
| ^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: structure field `dynamicImports` should have a snake case name
--> create-rust-app/src/util/template_utils.rs:128:5
|
128 | dynamicImports: Option<Vec<String>>, // using `import(..)`
| ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `dynamic_imports`
|
= note: `#[warn(non_snake_case)]` on by default
warning: structure field `isEntry` should have a snake case name
--> create-rust-app/src/util/template_utils.rs:134:5
|
134 | isEntry: Option<bool>,
| ^^^^^^^ help: convert the identifier to snake case: `is_entry`
warning: structure field `isDynamicEntry` should have a snake case name
--> create-rust-app/src/util/template_utils.rs:137:5
|
137 | isDynamicEntry: Option<bool>, // src: String, /* => not necessary :) */
| ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `is_dynamic_entry`
warning: `create-rust-app` (lib) generated 14 warnings (run `cargo fix --lib -p create-rust-app` to apply 6 suggestions)
warning: `create-rust-app_cli` (bin "create-rust-app") generated 4 warnings (run `cargo fix --bin "create-rust-app"` to apply 2 suggestions)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 49s```
Metadata
Metadata
Assignees
Labels
No labels