mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Fix ws clippy warnings
This commit is contained in:
parent
9d1bba5e92
commit
c32fa7cc2b
5 changed files with 25 additions and 14 deletions
|
|
@ -149,6 +149,19 @@ impl Connection {
|
|||
}
|
||||
|
||||
async fn send_message(&mut self) -> anyhow::Result<()> {
|
||||
let request = self.create_request();
|
||||
|
||||
self.stream.send(request.to_ws_message()).await?;
|
||||
|
||||
self.load_test_state
|
||||
.statistics
|
||||
.requests
|
||||
.fetch_add(1, Ordering::Relaxed);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn create_request(&mut self) -> InMessage {
|
||||
let mut rng = self.rng.borrow_mut();
|
||||
|
||||
let request = match random_request_type(&self.config, &mut *rng) {
|
||||
|
|
@ -226,18 +239,9 @@ impl Connection {
|
|||
}
|
||||
};
|
||||
|
||||
drop(rng);
|
||||
|
||||
self.can_send_answer = None;
|
||||
|
||||
self.stream.send(request.to_ws_message()).await?;
|
||||
|
||||
self.load_test_state
|
||||
.statistics
|
||||
.requests
|
||||
.fetch_add(1, Ordering::Relaxed);
|
||||
|
||||
Ok(())
|
||||
request
|
||||
}
|
||||
|
||||
async fn read_message(&mut self) -> anyhow::Result<()> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue