3540: Swtches to rust SSR query check r=matklad a=mikhail-m1

related to #3186 

Co-authored-by: Mikhail Modin <mikhailm1@gmail.com>
This commit is contained in:
bors[bot] 2020-03-16 09:48:09 +00:00 committed by GitHub
commit a99cac671c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 63 additions and 20 deletions

View file

@ -932,7 +932,10 @@ pub fn handle_document_highlight(
pub fn handle_ssr(world: WorldSnapshot, params: req::SsrParams) -> Result<req::SourceChange> {
let _p = profile("handle_ssr");
world.analysis().structural_search_replace(&params.arg)??.try_conv_with(&world)
world
.analysis()
.structural_search_replace(&params.query, params.parse_only)??
.try_conv_with(&world)
}
pub fn publish_diagnostics(world: &WorldSnapshot, file_id: FileId) -> Result<DiagnosticTask> {

View file

@ -218,6 +218,8 @@ impl Request for Ssr {
}
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct SsrParams {
pub arg: String,
pub query: String,
pub parse_only: bool,
}