1
1
use std:: collections:: HashMap ;
2
2
3
3
use serde:: { Deserialize , Serialize } ;
4
- use url:: Url ;
5
4
6
5
use crate :: {
7
6
Diagnostic , PartialResultParams , StaticRegistrationOptions , TextDocumentIdentifier ,
8
- TextDocumentRegistrationOptions , WorkDoneProgressOptions , WorkDoneProgressParams ,
7
+ TextDocumentRegistrationOptions , Uri , WorkDoneProgressOptions , WorkDoneProgressParams ,
9
8
} ;
10
9
11
10
/// Client capabilities specific to diagnostic pull requests.
@@ -158,10 +157,9 @@ pub struct RelatedFullDocumentDiagnosticReport {
158
157
/// macro definitions in a file `a.cpp` result in errors in a header file `b.hpp`.
159
158
///
160
159
/// @since 3.17.0
161
- #[ serde( with = "crate::url_map" ) ]
162
160
#[ serde( skip_serializing_if = "Option::is_none" ) ]
163
161
#[ serde( default ) ]
164
- pub related_documents : Option < HashMap < Url , DocumentDiagnosticReportKind > > ,
162
+ pub related_documents : Option < HashMap < Uri , DocumentDiagnosticReportKind > > ,
165
163
// relatedDocuments?: { [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; };
166
164
#[ serde( flatten) ]
167
165
pub full_document_diagnostic_report : FullDocumentDiagnosticReport ,
@@ -180,10 +178,9 @@ pub struct RelatedUnchangedDocumentDiagnosticReport {
180
178
/// macro definitions in a file `a.cpp` result in errors in a header file `b.hpp`.
181
179
///
182
180
/// @since 3.17.0
183
- #[ serde( with = "crate::url_map" ) ]
184
181
#[ serde( skip_serializing_if = "Option::is_none" ) ]
185
182
#[ serde( default ) ]
186
- pub related_documents : Option < HashMap < Url , DocumentDiagnosticReportKind > > ,
183
+ pub related_documents : Option < HashMap < Uri , DocumentDiagnosticReportKind > > ,
187
184
// relatedDocuments?: { [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; };
188
185
#[ serde( flatten) ]
189
186
pub unchanged_document_diagnostic_report : UnchangedDocumentDiagnosticReport ,
@@ -223,10 +220,9 @@ impl From<RelatedUnchangedDocumentDiagnosticReport> for DocumentDiagnosticReport
223
220
#[ derive( Debug , PartialEq , Default , Deserialize , Serialize , Clone ) ]
224
221
#[ serde( rename_all = "camelCase" ) ]
225
222
pub struct DocumentDiagnosticReportPartialResult {
226
- #[ serde( with = "crate::url_map" ) ]
227
223
#[ serde( skip_serializing_if = "Option::is_none" ) ]
228
224
#[ serde( default ) ]
229
- pub related_documents : Option < HashMap < Url , DocumentDiagnosticReportKind > > ,
225
+ pub related_documents : Option < HashMap < Uri , DocumentDiagnosticReportKind > > ,
230
226
// relatedDocuments?: { [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; };
231
227
}
232
228
0 commit comments