1
0
Fork 0
mirror of https://codeberg.org/demostf/sync.git synced 2026-06-03 16:44:07 +02:00

flake rework

This commit is contained in:
Robin Appelman 2024-11-22 21:30:45 +01:00
commit b0ae2c7927
14 changed files with 577 additions and 531 deletions

View file

@ -3,6 +3,7 @@ use parity_ws::{util::Token, Result, Sender};
#[enum_dispatch(Client)]
pub(crate) trait ClientTrait {
#[allow(clippy::result_large_err)]
fn send(&self, msg: &str) -> Result<()>;
fn token(&self) -> Token;

View file

@ -163,7 +163,7 @@ fn integration_tests() {
fn send<T: std::io::Write>(client: &mut Client<T>, command: SyncCommand) {
client
.send(Message::text(&serde_json::to_string(&command).unwrap()))
.send(Message::text(serde_json::to_string(&command).unwrap()))
.unwrap();
sleep(DELAY);
}

View file

@ -253,7 +253,7 @@ mod tests {
let sessions: RefCell<HashMap<String, Session>> = RefCell::new(HashMap::new());
let sender = Client::mock(1);
let command = SyncCommand::Create {
session: "test".into(),
session: "test",
token: "bar",
};