summaryrefslogtreecommitdiff
path: root/cli/lsp/sources.rs
diff options
context:
space:
mode:
authorYusuke Tanaka <yusuktan@maguro.dev>2021-07-30 22:03:41 +0900
committerGitHub <noreply@github.com>2021-07-30 15:03:41 +0200
commit8f00b5542caffd14988b923efe4f066b712d2858 (patch)
treee56ebefb0b73a2205bc482a0a6f55e87bd35a92b /cli/lsp/sources.rs
parentc909faf9e6cd2964398da7c0852d0229cdd1a22b (diff)
chore: upgrade Rust to 1.54.0 (#11554)
Diffstat (limited to 'cli/lsp/sources.rs')
-rw-r--r--cli/lsp/sources.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/lsp/sources.rs b/cli/lsp/sources.rs
index 033a1e9d5..8be1420d4 100644
--- a/cli/lsp/sources.rs
+++ b/cli/lsp/sources.rs
@@ -361,7 +361,7 @@ impl Inner {
&mut self,
specifier: &ModuleSpecifier,
) -> Option<String> {
- let metadata = self.get_metadata(&specifier)?;
+ let metadata = self.get_metadata(specifier)?;
metadata.maybe_warning
}
@@ -399,7 +399,7 @@ impl Inner {
map_content_type(specifier, maybe_content_type);
let source = get_source_from_bytes(bytes, maybe_charset).ok()?;
let maybe_types = headers.get("x-typescript-types").map(|s| {
- analysis::resolve_import(s, &specifier, &self.maybe_import_map)
+ analysis::resolve_import(s, specifier, &self.maybe_import_map)
});
let maybe_warning = headers.get("x-deno-warning").cloned();
(source, media_type, maybe_types, maybe_warning)
@@ -432,10 +432,10 @@ impl Inner {
fn get_path(&mut self, specifier: &ModuleSpecifier) -> Option<PathBuf> {
if specifier.scheme() == "file" {
specifier.to_file_path().ok()
- } else if let Some(path) = self.remotes.get(&specifier) {
+ } else if let Some(path) = self.remotes.get(specifier) {
Some(path.clone())
} else {
- let path = self.http_cache.get_cache_filename(&specifier)?;
+ let path = self.http_cache.get_cache_filename(specifier)?;
if path.is_file() {
self.remotes.insert(specifier.clone(), path.clone());
Some(path)