mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Use closure in trailing position and strongly type header map
This commit is contained in:
parent
87933e15ce
commit
d38f759c63
2 changed files with 21 additions and 18 deletions
|
@ -28,7 +28,7 @@ export async function fetchRelease(
|
|||
|
||||
log.debug("Issuing request for released artifacts metadata to", requestUrl);
|
||||
|
||||
var headers: any = { Accept: "application/vnd.github.v3+json" };
|
||||
const headers: Record<string, string> = { Accept: "application/vnd.github.v3+json" };
|
||||
if (githubToken != null) {
|
||||
headers.Authorization = "token " + githubToken;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue