feat: starting out with v1 API OpenAPI (#492) #265
clippy
6 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 6 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.79.0 (129f3b996 2024-06-10)
- cargo 1.79.0 (ffa9cf99a 2024-06-03)
- clippy 0.1.79 (129f3b9 2024-06-10)
Annotations
Check warning on line 333 in src/main.rs
github-actions / clippy
large size difference between variants
warning: large size difference between variants
--> src/main.rs:328:1
|
328 | / enum ServerCommands {
329 | | /// "run" sub command.
330 | | Run(server::run::Args),
| | ---------------------- the largest variant contains at least 344 bytes
331 | | /// Dump the schema.
332 | | Schema(crate::server::schema::Args),
| | ----------------------------------- the second-largest variant contains at least 24 bytes
333 | | }
| |_^ the entire enum is at least 344 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
|
330 | Run(Box<server::run::Args>),
| ~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 181 in src/server/run/versions.rs
github-actions / clippy
useless conversion to the same type: `pbs::common::versions::VersionSpec`
warning: useless conversion to the same type: `pbs::common::versions::VersionSpec`
--> src/server/run/versions.rs:181:35
|
181 | version_spec: with_version.version_spec.clone().into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `with_version.version_spec.clone()`
|
= 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
Check warning on line 180 in src/server/run/versions.rs
github-actions / clippy
using `clone` on type `AnnoDb` which implements the `Copy` trait
warning: using `clone` on type `AnnoDb` which implements the `Copy` trait
--> src/server/run/versions.rs:180:31
|
180 | database: anno_db.clone(),
| ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `anno_db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
Check warning on line 91 in src/server/run/versions.rs
github-actions / clippy
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> src/server/run/versions.rs:91:5
|
91 | impl Into<pbs::common::versions::VersionSpec> for VersionSpec {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implementation with `From<server::run::versions::schema::VersionSpec>`
|
91 ~ impl From<VersionSpec> for pbs::common::versions::VersionSpec {
92 ~ fn from(val: VersionSpec) -> Self {
93 ~ let VersionSpec {
94 | identifier,
...
104| created_from,
105~ } = val;
|
Check warning on line 84 in src/server/run/versions.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/server/run/versions.rs:84:52
|
84 | let yaml_str = std::fs::read_to_string(&full_path)
| ^^^^^^^^^^ help: change this to: `full_path`
|
= 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
Check warning on line 28 in src/server/run/versions.rs
github-actions / clippy
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> src/server/run/versions.rs:28:5
|
28 | impl Into<pbs::common::versions::CreatedFrom> for CreatedFrom {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implementation with `From<server::run::versions::schema::CreatedFrom>`
|
28 ~ impl From<CreatedFrom> for pbs::common::versions::CreatedFrom {
29 ~ fn from(val: CreatedFrom) -> Self {
30 ~ let CreatedFrom { name, version } = val;
|