mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
refactor(cli): fewer clones (#17450)
This commit is contained in:
parent
40527526e5
commit
e023a6e3f0
6 changed files with 21 additions and 36 deletions
|
@ -52,15 +52,13 @@ static JS_HEADERS: Lazy<HashMap<String, String>> = Lazy::new(|| {
|
|||
"content-type".to_string(),
|
||||
"application/javascript".to_string(),
|
||||
)])
|
||||
.iter()
|
||||
.cloned()
|
||||
.into_iter()
|
||||
.collect()
|
||||
});
|
||||
|
||||
static JSX_HEADERS: Lazy<HashMap<String, String>> = Lazy::new(|| {
|
||||
([("content-type".to_string(), "text/jsx".to_string())])
|
||||
.iter()
|
||||
.cloned()
|
||||
.into_iter()
|
||||
.collect()
|
||||
});
|
||||
|
||||
|
@ -69,15 +67,13 @@ static TS_HEADERS: Lazy<HashMap<String, String>> = Lazy::new(|| {
|
|||
"content-type".to_string(),
|
||||
"application/typescript".to_string(),
|
||||
)])
|
||||
.iter()
|
||||
.cloned()
|
||||
.into_iter()
|
||||
.collect()
|
||||
});
|
||||
|
||||
static TSX_HEADERS: Lazy<HashMap<String, String>> = Lazy::new(|| {
|
||||
([("content-type".to_string(), "text/tsx".to_string())])
|
||||
.iter()
|
||||
.cloned()
|
||||
.into_iter()
|
||||
.collect()
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue