mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Remove RawResponse::empty()
This commit is contained in:
parent
33cebe1724
commit
6eb45c1c2b
2 changed files with 5 additions and 7 deletions
|
@ -120,11 +120,6 @@ impl RawResponse {
|
|||
let error = RawResponseError { code, message, data: None };
|
||||
RawResponse { id, result: None, error: Some(error) }
|
||||
}
|
||||
/// Returns an "empty" RawResponse
|
||||
/// Empty response still has a value `()` in its `result` field.
|
||||
pub fn empty(id: u64) -> RawResponse {
|
||||
RawResponse { id, result: Some(to_value(&()).unwrap()), error: None }
|
||||
}
|
||||
}
|
||||
|
||||
impl RawNotification {
|
||||
|
|
|
@ -425,8 +425,11 @@ impl<'a> PoolDispatcher<'a> {
|
|||
// ErrorCode::ContentModified as i32,
|
||||
// "content modified".to_string(),
|
||||
// )
|
||||
RawResponse::empty(id)
|
||||
|
||||
RawResponse {
|
||||
id,
|
||||
result: Some(serde_json::to_value(&()).unwrap()),
|
||||
error: None,
|
||||
}
|
||||
} else {
|
||||
RawResponse::err(
|
||||
id,
|
||||
|
|
Loading…
Reference in a new issue