Skip to content

Commit

Permalink
Merge pull request #264 from tage64/master
Browse files Browse the repository at this point in the history
Add `Send + Sync + 'static` bounds to associated types in `Request` and `Notification` traits
  • Loading branch information
Marwes authored Nov 22, 2023
2 parents 424676b + eb8b34f commit a15daed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use super::*;
use serde::{de::DeserializeOwned, Serialize};

pub trait Notification {
type Params: DeserializeOwned + Serialize;
type Params: DeserializeOwned + Serialize + Send + Sync + 'static;
const METHOD: &'static str;
}

Expand Down
4 changes: 2 additions & 2 deletions src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use super::*;
use serde::{de::DeserializeOwned, Serialize};

pub trait Request {
type Params: DeserializeOwned + Serialize;
type Result: DeserializeOwned + Serialize;
type Params: DeserializeOwned + Serialize + Send + Sync + 'static;
type Result: DeserializeOwned + Serialize + Send + Sync + 'static;
const METHOD: &'static str;
}

Expand Down

0 comments on commit a15daed

Please sign in to comment.