3290: Don't block onEnter if request fails r=matklad a=matklad

closes #3286



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-02-24 11:48:15 +00:00 committed by GitHub
commit e2a8e891c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,6 +19,12 @@ async function handleKeypress(ctx: Ctx) {
const change = await client.sendRequest<undefined | SourceChange>(
'rust-analyzer/onEnter',
request,
).catch(
(_error: any) => {
// FIXME: switch to the more modern (?) typed request infrastructure
// client.logFailedRequest(OnEnterRequest.type, error);
return Promise.resolve(null);
}
);
if (!change) return false;