mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
simplify bouds
This commit is contained in:
parent
52de08330f
commit
46e4232cc6
2 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ use ::{
|
||||||
pub struct Responder<R: ClientRequest> {
|
pub struct Responder<R: ClientRequest> {
|
||||||
id: u64,
|
id: u64,
|
||||||
bomb: DropBomb,
|
bomb: DropBomb,
|
||||||
ph: PhantomData<R>,
|
ph: PhantomData<fn(R)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<R: ClientRequest> Responder<R>
|
impl<R: ClientRequest> Responder<R>
|
||||||
|
|
|
@ -7,14 +7,14 @@ pub use languageserver_types::{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
pub trait ClientRequest: Send + 'static {
|
pub trait ClientRequest: 'static {
|
||||||
type Params: DeserializeOwned + Send + 'static;
|
type Params: DeserializeOwned + Send + 'static;
|
||||||
type Result: Serialize + Send + 'static;
|
type Result: Serialize + Send + 'static;
|
||||||
const METHOD: &'static str;
|
const METHOD: &'static str;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> ClientRequest for T
|
impl<T> ClientRequest for T
|
||||||
where T: Request + Send + 'static,
|
where T: Request + 'static,
|
||||||
T::Params: DeserializeOwned + Send + 'static,
|
T::Params: DeserializeOwned + Send + 'static,
|
||||||
T::Result: Serialize + Send + 'static,
|
T::Result: Serialize + Send + 'static,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue