diff options
Diffstat (limited to 'crates/rust-analyzer/src/req.rs')
-rw-r--r-- | crates/rust-analyzer/src/req.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/rust-analyzer/src/req.rs b/crates/rust-analyzer/src/req.rs index fd6aef597..a3efe3b9f 100644 --- a/crates/rust-analyzer/src/req.rs +++ b/crates/rust-analyzer/src/req.rs | |||
@@ -42,14 +42,14 @@ impl Request for SyntaxTree { | |||
42 | const METHOD: &'static str = "rust-analyzer/syntaxTree"; | 42 | const METHOD: &'static str = "rust-analyzer/syntaxTree"; |
43 | } | 43 | } |
44 | 44 | ||
45 | #[derive(Deserialize, Debug)] | 45 | #[derive(Deserialize, Serialize, Debug)] |
46 | #[serde(rename_all = "camelCase")] | 46 | #[serde(rename_all = "camelCase")] |
47 | pub struct SyntaxTreeParams { | 47 | pub struct SyntaxTreeParams { |
48 | pub text_document: TextDocumentIdentifier, | 48 | pub text_document: TextDocumentIdentifier, |
49 | pub range: Option<Range>, | 49 | pub range: Option<Range>, |
50 | } | 50 | } |
51 | 51 | ||
52 | #[derive(Serialize, Debug)] | 52 | #[derive(Deserialize, Serialize, Debug)] |
53 | #[serde(rename_all = "camelCase")] | 53 | #[serde(rename_all = "camelCase")] |
54 | pub struct ExpandedMacro { | 54 | pub struct ExpandedMacro { |
55 | pub name: String, | 55 | pub name: String, |
@@ -64,7 +64,7 @@ impl Request for ExpandMacro { | |||
64 | const METHOD: &'static str = "rust-analyzer/expandMacro"; | 64 | const METHOD: &'static str = "rust-analyzer/expandMacro"; |
65 | } | 65 | } |
66 | 66 | ||
67 | #[derive(Deserialize, Debug)] | 67 | #[derive(Deserialize, Serialize, Debug)] |
68 | #[serde(rename_all = "camelCase")] | 68 | #[serde(rename_all = "camelCase")] |
69 | pub struct ExpandMacroParams { | 69 | pub struct ExpandMacroParams { |
70 | pub text_document: TextDocumentIdentifier, | 70 | pub text_document: TextDocumentIdentifier, |
@@ -79,7 +79,7 @@ impl Request for FindMatchingBrace { | |||
79 | const METHOD: &'static str = "rust-analyzer/findMatchingBrace"; | 79 | const METHOD: &'static str = "rust-analyzer/findMatchingBrace"; |
80 | } | 80 | } |
81 | 81 | ||
82 | #[derive(Deserialize, Debug)] | 82 | #[derive(Deserialize, Serialize, Debug)] |
83 | #[serde(rename_all = "camelCase")] | 83 | #[serde(rename_all = "camelCase")] |
84 | pub struct FindMatchingBraceParams { | 84 | pub struct FindMatchingBraceParams { |
85 | pub text_document: TextDocumentIdentifier, | 85 | pub text_document: TextDocumentIdentifier, |
@@ -101,14 +101,14 @@ impl Notification for PublishDecorations { | |||
101 | const METHOD: &'static str = "rust-analyzer/publishDecorations"; | 101 | const METHOD: &'static str = "rust-analyzer/publishDecorations"; |
102 | } | 102 | } |
103 | 103 | ||
104 | #[derive(Serialize, Debug)] | 104 | #[derive(Deserialize, Serialize, Debug)] |
105 | #[serde(rename_all = "camelCase")] | 105 | #[serde(rename_all = "camelCase")] |
106 | pub struct PublishDecorationsParams { | 106 | pub struct PublishDecorationsParams { |
107 | pub uri: Url, | 107 | pub uri: Url, |
108 | pub decorations: Vec<Decoration>, | 108 | pub decorations: Vec<Decoration>, |
109 | } | 109 | } |
110 | 110 | ||
111 | #[derive(Serialize, Debug)] | 111 | #[derive(Deserialize, Serialize, Debug)] |
112 | #[serde(rename_all = "camelCase")] | 112 | #[serde(rename_all = "camelCase")] |
113 | pub struct Decoration { | 113 | pub struct Decoration { |
114 | pub range: Range, | 114 | pub range: Range, |
@@ -132,7 +132,7 @@ impl Request for JoinLines { | |||
132 | const METHOD: &'static str = "rust-analyzer/joinLines"; | 132 | const METHOD: &'static str = "rust-analyzer/joinLines"; |
133 | } | 133 | } |
134 | 134 | ||
135 | #[derive(Deserialize, Debug)] | 135 | #[derive(Deserialize, Serialize, Debug)] |
136 | #[serde(rename_all = "camelCase")] | 136 | #[serde(rename_all = "camelCase")] |
137 | pub struct JoinLinesParams { | 137 | pub struct JoinLinesParams { |
138 | pub text_document: TextDocumentIdentifier, | 138 | pub text_document: TextDocumentIdentifier, |
@@ -162,7 +162,7 @@ pub struct RunnablesParams { | |||
162 | pub position: Option<Position>, | 162 | pub position: Option<Position>, |
163 | } | 163 | } |
164 | 164 | ||
165 | #[derive(Serialize, Debug)] | 165 | #[derive(Deserialize, Serialize, Debug)] |
166 | #[serde(rename_all = "camelCase")] | 166 | #[serde(rename_all = "camelCase")] |
167 | pub struct Runnable { | 167 | pub struct Runnable { |
168 | pub range: Range, | 168 | pub range: Range, |
@@ -173,7 +173,7 @@ pub struct Runnable { | |||
173 | pub cwd: Option<String>, | 173 | pub cwd: Option<String>, |
174 | } | 174 | } |
175 | 175 | ||
176 | #[derive(Serialize, Debug)] | 176 | #[derive(Deserialize, Serialize, Debug)] |
177 | #[serde(rename_all = "camelCase")] | 177 | #[serde(rename_all = "camelCase")] |
178 | pub struct SourceChange { | 178 | pub struct SourceChange { |
179 | pub label: String, | 179 | pub label: String, |