Skip to content

fix: Remove multi-parts for deleted objects #1563

fix: Remove multi-parts for deleted objects

fix: Remove multi-parts for deleted objects #1563

GitHub Actions / clippy succeeded Feb 7, 2025 in 0s

clippy

22 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 22
Note 0
Help 0

Versions

  • rustc 1.84.1 (e71f9a9a9 2025-01-27)
  • cargo 1.84.1 (66221abde 2024-11-19)
  • clippy 0.1.84 (e71f9a9a98 2025-01-27)

Annotations

Check warning on line 163 in components/data_proxy/src/helpers.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

stripping a prefix manually

warning: stripping a prefix manually
   --> components/data_proxy/src/helpers.rs:163:21
    |
163 |         let parts = path[7..].split_once('/');
    |                     ^^^^^^^^^
    |
note: the prefix was tested here
   --> components/data_proxy/src/helpers.rs:162:12
    |
162 |     } else if path.starts_with("file://") {
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip
help: try using the `strip_prefix` method
    |
162 ~     } else if let Some(<stripped>) = path.strip_prefix("file://") {
163 ~         let parts = <stripped>.split_once('/');
    |

Check warning on line 156 in components/data_proxy/src/helpers.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

stripping a prefix manually

warning: stripping a prefix manually
   --> components/data_proxy/src/helpers.rs:156:21
    |
156 |         let parts = path[5..].split_once('/');
    |                     ^^^^^^^^^
    |
note: the prefix was tested here
   --> components/data_proxy/src/helpers.rs:155:5
    |
155 |     if path.starts_with("s3://") {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip
    = note: `#[warn(clippy::manual_strip)]` on by default
help: try using the `strip_prefix` method
    |
155 ~     if let Some(<stripped>) = path.strip_prefix("s3://") {
156 ~         let parts = <stripped>.split_once('/');
    |

Check warning on line 270 in components/data_proxy/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

name `REPLICATIONOUT` contains a capitalized acronym

warning: name `REPLICATIONOUT` contains a capitalized acronym
   --> components/data_proxy/src/config.rs:270:5
    |
270 |     REPLICATIONOUT,
    |     ^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Replicationout`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms

Check warning on line 269 in components/data_proxy/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

name `REPLICATIONIN` contains a capitalized acronym

warning: name `REPLICATIONIN` contains a capitalized acronym
   --> components/data_proxy/src/config.rs:269:5
    |
269 |     REPLICATIONIN,
    |     ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Replicationin`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms

Check warning on line 268 in components/data_proxy/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

name `BUNDLE` contains a capitalized acronym

warning: name `BUNDLE` contains a capitalized acronym
   --> components/data_proxy/src/config.rs:268:5
    |
268 |     BUNDLE,
    |     ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Bundle`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms

Check warning on line 267 in components/data_proxy/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

name `OBJECTPACKAGE` contains a capitalized acronym

warning: name `OBJECTPACKAGE` contains a capitalized acronym
   --> components/data_proxy/src/config.rs:267:5
    |
267 |     OBJECTPACKAGE,
    |     ^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Objectpackage`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms

Check warning on line 266 in components/data_proxy/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

name `OBJECT` contains a capitalized acronym

warning: name `OBJECT` contains a capitalized acronym
   --> components/data_proxy/src/config.rs:266:5
    |
266 |     OBJECT,
    |     ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Object`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms

Check warning on line 265 in components/data_proxy/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

name `ROOT` contains a capitalized acronym

warning: name `ROOT` contains a capitalized acronym
   --> components/data_proxy/src/config.rs:265:5
    |
265 |     ROOT, // Info
    |     ^^^^ help: consider making the acronym lowercase, except the initial letter: `Root`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
    = note: `#[warn(clippy::upper_case_acronyms)]` on by default

Check warning on line 1 in components/data_proxy/src/auth/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

module has the same name as its containing module

warning: module has the same name as its containing module
 --> components/data_proxy/src/auth/mod.rs:1:1
  |
1 | pub mod auth;
  | ^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
  = note: `#[warn(clippy::module_inception)]` on by default

Check warning on line 1861 in components/data_proxy/src/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

struct update has no effect, all the fields in the struct have already been specified

warning: struct update has no effect, all the fields in the struct have already been specified
    --> components/data_proxy/src/structs.rs:1861:19
     |
1861 |                 ..Default::default()
     |                   ^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update

Check warning on line 1856 in components/data_proxy/src/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

struct update has no effect, all the fields in the struct have already been specified

warning: struct update has no effect, all the fields in the struct have already been specified
    --> components/data_proxy/src/structs.rs:1856:19
     |
1856 |                 ..Default::default()
     |                   ^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
     = note: `#[warn(clippy::needless_update)]` on by default

Check warning on line 1672 in components/data_proxy/src/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

large size difference between variants

warning: large size difference between variants
    --> components/data_proxy/src/structs.rs:1659:1
     |
1659 | /   pub enum ObjectsState {
1660 | | /     Regular {
1661 | | |         states: ResourceStates,
1662 | | |         location: Option<ObjectLocation>,
1663 | | |     },
     | | |_____- the largest variant contains at least 1768 bytes
1664 | | /     Objects {
1665 | | |         root: Object,
1666 | | |         filename: String,
1667 | | |     },
     | | |_____- the second-largest variant contains at least 424 bytes
...    |
1671 | |       },
1672 | |   }
     | |___^ the entire enum is at least 1768 bytes
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
     |
1661 |         states: Box<ResourceStates>,
     |                 ~~~~~~~~~~~~~~~~~~~

Check warning on line 1564 in components/data_proxy/src/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
    --> components/data_proxy/src/structs.rs:1555:10
     |
1555 |       ) -> Result<
     |  __________^
1556 | |         (
1557 | |             NewOrExistingObject,
1558 | |             NewOrExistingObject,
...    |
1563 | |         S3Error,
1564 | |     > {
     | |_____^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Check warning on line 1246 in components/data_proxy/src/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

large size difference between variants

warning: large size difference between variants
    --> components/data_proxy/src/structs.rs:1236:1
     |
1236 | /   pub enum ResourceState {
1237 | | /     Found {
1238 | | |         object: Object,
1239 | | |     },
     | | |_____- the largest variant contains at least 400 bytes
1240 | | /     Missing {
1241 | | |         name: String,
1242 | | |         variant: ResourceVariant,
1243 | | |     },
     | | |_____- the second-largest variant contains at least 28 bytes
1244 | |       #[default]
1245 | |       None,
1246 | |   }
     | |___^ the entire enum is at least 400 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
     |
1238 |         object: Box<Object>,
     |                 ~~~~~~~~~~~

Check warning on line 403 in components/data_proxy/src/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
   --> components/data_proxy/src/structs.rs:400:10
    |
400 |       ) -> (
    |  __________^
401 | |         Vec<(String, HashMap<DieselUlid, DbPermissionLevel>)>,
402 | |         Vec<String>,
403 | |     ) {
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Check warning on line 72 in components/server/src/middlelayer/announcements_db_handler.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
  --> components/server/src/middlelayer/announcements_db_handler.rs:72:25
   |
72 |         Ok(announcement.try_into()?)
   |                         ^^^^^^^^ help: use: `into`
   |
   = note: converting `Announcement` to `Announcement` cannot fail
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
   = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default

Check warning on line 22 in components/data_proxy/src/s3_frontend/utils/ranges.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
  --> components/data_proxy/src/s3_frontend/utils/ranges.rs:22:6
   |
22 | ) -> Result<(Option<String>, Option<Vec<u64>>, u64, Option<ArunaRange>)> {
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
   = note: `#[warn(clippy::type_complexity)]` on by default

Check warning on line 166 in components/server/src/caching/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> components/server/src/caching/structs.rs:166:6
    |
166 | impl<'a> Iterator for ProxyCacheIterator<'a> {
    |      ^^                                  ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
    |
166 - impl<'a> Iterator for ProxyCacheIterator<'a> {
166 + impl Iterator for ProxyCacheIterator<'_> {
    |

Check warning on line 531 in components/data_proxy/src/caching/cache.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` has identical blocks

warning: this `if` has identical blocks
   --> components/data_proxy/src/caching/cache.rs:529:51
    |
529 |   ...                   if with_intermediates {
    |  _____________________________________________^
530 | | ...                       final_result.push((*id, current_path.clone()));
531 | | ...                   } else if x == 2 {
    | |_______________________^
    |
note: same as this
   --> components/data_proxy/src/caching/cache.rs:531:46
    |
531 |   ...                   } else if x == 2 {
    |  ________________________________________^
532 | | ...                       final_result.push((*id, current_path.clone()));
533 | | ...                   }
    | |_______________________^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
    = note: `#[warn(clippy::if_same_then_else)]` on by default

Check warning on line 57 in components/data_proxy/src/s3_frontend/s3service.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `tower::buffer`

warning: unused import: `tower::buffer`
  --> components/data_proxy/src/s3_frontend/s3service.rs:57:5
   |
57 | use tower::buffer;
   |     ^^^^^^^^^^^^^

Check warning on line 19 in components/data_proxy/src/s3_frontend/s3service.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `aws_config::profile::parser`

warning: unused import: `aws_config::profile::parser`
  --> components/data_proxy/src/s3_frontend/s3service.rs:19:5
   |
19 | use aws_config::profile::parser;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 9 in components/data_proxy/src/database/persistence.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `tracing::debug`

warning: unused import: `tracing::debug`
 --> components/data_proxy/src/database/persistence.rs:9:5
  |
9 | use tracing::debug;
  |     ^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default