Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
greatest-ape committed May 3, 2024
1 parent 7795a1a commit 215a22c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/udp_protocol/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Request {
"Full scrapes are not allowed",
connection_id,
transaction_id,
))
));
}

let info_hashes = FromBytes::slice_from(remaining_bytes).ok_or_else(|| {
Expand Down Expand Up @@ -387,7 +387,8 @@ mod tests {
for action in 0i32..4 {
for max_scrape_torrents in 0..3 {
for num_bytes in 0..256 {
let mut request_bytes = ::std::iter::repeat(0).take(num_bytes).collect::<Vec<_>>();
let mut request_bytes =
::std::iter::repeat(0).take(num_bytes).collect::<Vec<_>>();

if let Some(action_bytes) = request_bytes.get_mut(8..12) {
action_bytes.copy_from_slice(&action.to_be_bytes())
Expand Down

0 comments on commit 215a22c

Please sign in to comment.