Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
primoze committed Feb 1, 2024
1 parent 3196a86 commit c6a8697
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/api/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl Image {
let headers = opts
.auth_header()
.map(|auth| Headers::single(AUTH_HEADER, auth))
.unwrap_or_else(Headers::default);
.unwrap_or_default();

self.docker
.post_string(&ep, Payload::empty(), Some(headers))
Expand Down
6 changes: 2 additions & 4 deletions tests/container_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,12 +677,11 @@ async fn container_attach() {
let _ = container.start().await;

let mut multiplexer = container.attach().await.unwrap();
while let Some(chunk) = multiplexer.next().await {
if let Some(chunk) = multiplexer.next().await {
match chunk {
Ok(TtyChunk::StdOut(chunk)) => {
let logs = String::from_utf8_lossy(&chunk);
assert_eq!(logs, "123456\r\n");
break;
}
chunk => {
eprintln!("invalid chunk {chunk:?}");
Expand Down Expand Up @@ -713,12 +712,11 @@ async fn container_attach() {
let _ = container.start().await;

let mut multiplexer = container.attach().await.unwrap();
while let Some(chunk) = multiplexer.next().await {
if let Some(chunk) = multiplexer.next().await {
match chunk {
Ok(TtyChunk::StdOut(chunk)) => {
let logs = String::from_utf8_lossy(&chunk);
assert_eq!(logs, "123456\n");
break;
}
chunk => {
eprintln!("invalid chunk {chunk:?}");
Expand Down

0 comments on commit c6a8697

Please sign in to comment.