Skip to content

Update changelog for 0.6.1 #1682

Update changelog for 0.6.1

Update changelog for 0.6.1 #1682

GitHub Actions / clippy results succeeded Dec 3, 2023 in 1s

clippy results

66 warnings

Details

Results

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

Versions

  • rustc 1.74.0 (79e9716c9 2023-11-13)
  • cargo 1.74.0 (ecb9851af 2023-10-18)
  • clippy 0.1.74 (79e9716 2023-11-13)

Annotations

Check warning on line 1113 in cli/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
    --> cli/src/main.rs:1110:35
     |
1110 |       let tmp_dir = target_dir.join(&format!(
     |  ___________________________________^
1111 | |         "wormhole-tmp-{:06}",
1112 | |         rand::thread_rng().gen_range(0..1_000_000)
1113 | |     ));
     | |_____^
     |
     = 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
help: change this to
     |
1110 ~     let tmp_dir = target_dir.join(format!(
1111 +         "wormhole-tmp-{:06}",
1112 +         rand::thread_rng().gen_range(0..1_000_000)
1113 ~     ));
     |

Check warning on line 1070 in cli/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

question mark operator is useless here

warning: question mark operator is useless here
    --> cli/src/main.rs:1062:5
     |
1062 | /     Ok(req
1063 | |         .accept(
1064 | |             &transit::log_transit_connection,
1065 | |             &mut file,
...    |
1069 | |         .await
1070 | |         .context("Receive process failed")?)
     | |____________________________________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
     = note: `#[warn(clippy::needless_question_mark)]` on by default
help: try removing question mark and `Ok()`
     |
1062 ~     req
1063 +         .accept(
1064 +             &transit::log_transit_connection,
1065 +             &mut file,
1066 +             create_progress_handler(pb),
1067 +             ctrl_c(),
1068 +         )
1069 +         .await
1070 +         .context("Receive process failed")
     |

Check warning on line 621 in cli/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

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

warning: very complex type used. Consider factoring parts into `type` definitions
   --> cli/src/main.rs:619:17
    |
619 |       print_code: Option<
    |  _________________^
620 | |         &dyn Fn(&mut Term, &magic_wormhole::Code, &Option<url::Url>) -> eyre::Result<()>,
621 | |     >,
    | |_____^
    |
    = 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 573 in cli/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

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
   --> cli/src/main.rs:573:49
    |
573 |                     std::io::stdout().write_all(&out.as_bytes())?;
    |                                                 ^^^^^^^^^^^^^^^ help: change this to: `out.as_bytes()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 423 in cli/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

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
   --> cli/src/main.rs:423:54
    |
423 |             if with_dilation && peer_allows_dilation(&wormhole.peer_version()) {
    |                                                      ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `wormhole.peer_version()`
    |
    = 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 23 in cli/src/util.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

deref on an immutable reference

warning: deref on an immutable reference
  --> cli/src/util.rs:23:15
   |
23 |         match &*answer.to_lowercase().trim() {
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `answer.to_lowercase().trim()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
   = note: `#[warn(clippy::borrow_deref_ref)]` on by default

Check warning on line 134 in src/uri.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

unnecessary use of `to_string`

warning: unnecessary use of `to_string`
   --> src/uri.rs:134:49
    |
134 |                 query.append_pair("rendezvous", &rendezvous_server.to_string());
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `rendezvous_server.as_ref()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
    = note: `#[warn(clippy::unnecessary_to_owned)]` on by default

Check warning on line 128 in src/uri.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

deref which would be done by auto-deref

warning: deref which would be done by auto-deref
   --> src/uri.rs:128:22
    |
128 |         url.set_path(&*val.code);
    |                      ^^^^^^^^^^ help: try: `&val.code`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref

Check warning on line 78 in src/uri.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

redundant guard

warning: redundant guard
  --> src/uri.rs:78:24
   |
78 |             version if version == "0" => {},
   |                        ^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
   = note: `#[warn(clippy::redundant_guards)]` on by default
help: try
   |
78 -             version if version == "0" => {},
78 +             "0" => {},
   |

Check warning on line 353 in src/transit/crypto.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

length comparison to zero

warning: length comparison to zero
   --> src/transit/crypto.rs:353:13
    |
353 |             peer_confirmation_message.len() == 0,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `peer_confirmation_message.is_empty()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero

Check warning on line 333 in src/transit/crypto.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

deref which would be done by auto-deref

warning: deref which would be done by auto-deref
   --> src/transit/crypto.rs:333:28
    |
333 |         handshake.push_psk(&*self.key);
    |                            ^^^^^^^^^^ help: try: `&self.key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref

Check warning on line 282 in src/transit/crypto.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

length comparison to zero

warning: length comparison to zero
   --> src/transit/crypto.rs:282:13
    |
282 |             peer_confirmation_message.len() == 0,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `peer_confirmation_message.is_empty()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
    = note: `#[warn(clippy::len_zero)]` on by default

Check warning on line 266 in src/transit/crypto.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

deref which would be done by auto-deref

warning: deref which would be done by auto-deref
   --> src/transit/crypto.rs:266:28
    |
266 |         handshake.push_psk(&*self.key);
    |                            ^^^^^^^^^^ help: try: `&self.key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
    = note: `#[warn(clippy::explicit_auto_deref)]` on by default

Check warning on line 738 in src/transfer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeMap`

warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeMap`
   --> src/transfer.rs:738:22
    |
738 |                     .into_iter()
    |                      ^^^^^^^^^ help: call directly: `iter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
    = note: `#[warn(clippy::into_iter_on_ref)]` on by default

Check warning on line 734 in src/transfer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

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
   --> src/transfer.rs:734:28
    |
734 |                 content: f(&base_path),
    |                            ^^^^^^^^^^ help: change this to: `base_path`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 594 in src/transfer/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

useless use of `format!`

warning: useless use of `format!`
   --> src/transfer/v2.rs:594:17
    |
594 |                 format!("Unexpected message: got 'file-start' but did not expect any more files")
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected message: got 'file-start' but did not expect any more files".to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
    = note: `#[warn(clippy::useless_format)]` on by default

Check warning on line 265 in src/transfer/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

needlessly taken reference of both operands

warning: needlessly taken reference of both operands
   --> src/transfer/v2.rs:265:16
    |
265 |             if &*our_hash == &sha256[..] {
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
    = note: `#[warn(clippy::op_ref)]` on by default
help: use the values directly
    |
265 |             if *our_hash == sha256[..] {
    |                ~~~~~~~~~    ~~~~~~~~~~

Check warning on line 249 in src/transfer/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

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
   --> src/transfer/v2.rs:249:39
    |
249 |         let content = (offer.get_file(&file).unwrap().0)();
    |                                       ^^^^^ help: change this to: `file`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 214 in src/transfer/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

returning the result of a `let` binding from a block

warning: returning the result of a `let` binding from a block
   --> src/transfer/v2.rs:214:9
    |
213 |         let message = PeerMessageV2::Offer((&offer).into()).ser_msgpack();
    |         ------------------------------------------------------------------ unnecessary `let` binding
214 |         message
    |         ^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
    |
213 ~         
214 ~         PeerMessageV2::Offer((&offer).into()).ser_msgpack()
    |

Check warning on line 121 in src/transfer/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

useless conversion to the same type: `transit::Hints`

warning: useless conversion to the same type: `transit::Hints`
   --> src/transfer/v2.rs:121:17
    |
121 |                 transit.hints_v2.into()
    |                 ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `transit.hints_v2`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 112 in src/transfer/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

useless conversion to the same type: `transit::Hints`

warning: useless conversion to the same type: `transit::Hints`
   --> src/transfer/v2.rs:112:13
    |
112 |             (**connector.our_hints()).clone().into(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `(**connector.our_hints()).clone()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 776 in src/transfer/v1.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

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
   --> src/transfer/v1.rs:776:35
    |
776 |             let data = path2bytes(&path);
    |                                   ^^^^^ help: change this to: `path`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 333 in src/transfer/v1.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

this async expression only awaits a single future

warning: this async expression only awaits a single future
   --> src/transfer/v1.rs:333:69
    |
333 |         let content = futures::stream::iter(content).then(|content| async { content.await });
    |                                                                     ^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `content`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_async_block
    = note: `#[warn(clippy::redundant_async_block)]` on by default

Check warning on line 302 in src/transfer/v1.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

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
   --> src/transfer/v1.rs:302:65
    |
302 |                     let header = tar_helper::create_header_file(&path, size)?;
    |                                                                 ^^^^^ help: change this to: `path`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 285 in src/transfer/v1.rs

See this annotation in the file changed.

@github-actions github-actions / clippy results

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

warning: very complex type used. Consider factoring parts into `type` definitions
   --> src/transfer/v1.rs:285:14
    |
285 |         ) -> IoResult<Vec<BoxFuture<'static, IoResult<Box<dyn AsyncRead + Unpin + Send + 'static>>>>>
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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