Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
KershawChang committed Mar 13, 2024
1 parent 1920679 commit 7f53105
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions neqo-transport/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1942,8 +1942,9 @@ impl Connection {
// a packet on a new path, we avoid sending (and the privacy risk) rather
// than reuse a connection ID.
if path.is_temporary() {
#[cfg(test)]
assert!(false, "path is temporary");
if cfg!(test) {
panic!("attempting to close with a temporary path");
}
return Err(Error::InternalError);
}
let (_, mut builder) = Self::build_packet_header(
Expand Down
2 changes: 1 addition & 1 deletion neqo-transport/src/connection/tests/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ impl crate::connection::test_internal::FrameWriter for GarbageWriter {
/// Test the case that we run out of connection ID and receive an invalid frame
/// from a new path.
#[test]
#[should_panic(expected = "path is temporary")]
#[should_panic(expected = "attempting to close with a temporary path")]
fn error_on_new_path_with_no_connection_id() {
let mut client = default_client();
let mut server = default_server();
Expand Down

0 comments on commit 7f53105

Please sign in to comment.