Skip to content

feat: support copy files to container (#730) #1151

feat: support copy files to container (#730)

feat: support copy files to container (#730) #1151

GitHub Actions / clippy succeeded Sep 13, 2024 in 0s

clippy

7 warnings

Details

Results

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

Versions

  • rustc 1.81.0 (eeb90cda1 2024-09-04)
  • cargo 1.81.0 (2dbb1af80 2024-08-20)
  • clippy 0.1.81 (eeb90cd 2024-09-04)

Annotations

Check warning on line 221 in testcontainers/src/runners/async_runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> testcontainers/src/runners/async_runner.rs:221:51
    |
221 |                 .copy_to_container(&container_id, &copy_to_source)
    |                                                   ^^^^^^^^^^^^^^^ help: change this to: `copy_to_source`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 47 in testcontainers/src/core/logs/consumer/logging_consumer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this manual char comparison can be written more succinctly

warning: this manual char comparison can be written more succinctly
  --> testcontainers/src/core/logs/consumer/logging_consumer.rs:47:48
   |
47 |         let message = message.trim_end_matches(|c| c == '\n' || c == '\r');
   |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['\n', '\r']`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison
   = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default

Check warning on line 52 in testcontainers/src/core/copy.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> testcontainers/src/core/copy.rs:52:46
   |
52 |                 ar.append_file(&target_path, &mut f)
   |                                              ^^^^^^ help: change this to: `f`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `#[warn(clippy::needless_borrow)]` on by default

Check warning on line 30 in testcontainers/src/core/copy.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
  --> testcontainers/src/core/copy.rs:30:21
   |
30 |             None => return Err(CopyToContaienrError::PathNameError(self.target.clone())),
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
   = note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
   |
30 |             None => Err(CopyToContaienrError::PathNameError(self.target.clone())),
   |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 93 in testcontainers/src/core/image/image_ext.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item without indentation

warning: doc list item without indentation
  --> testcontainers/src/core/image/image_ext.rs:93:9
   |
93 |     /// If not specified, the daemon default is used, which can either be `\"private\"` or `\"host\"`, depending on daemon version, kerne...
   |         ^
   |
   = 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
   |
93 |     ///   If not specified, the daemon default is used, which can either be `\"private\"` or `\"host\"`, depending on daemon version, kernel support and configuration.
   |         ++

Check warning on line 29 in testimages/build.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> testimages/build.rs:27:14
   |
27 |           .arg(&format!(
   |  ______________^
28 | |             "{cwd}/src/dockerfiles/simple_web_server.dockerfile"
29 | |         ))
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
   |
27 ~         .arg(format!(
28 +             "{cwd}/src/dockerfiles/simple_web_server.dockerfile"
29 ~         ))
   |

Check warning on line 12 in testimages/build.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> testimages/build.rs:12:14
   |
12 |         .arg(&format!("{cwd}/src/dockerfiles/no_expose_port.dockerfile"))
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{cwd}/src/dockerfiles/no_expose_port.dockerfile")`
   |
   = 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