From de713e42c8807e3124c9b5d418a69d2ea3460058 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 16 Aug 2019 20:49:00 -0400 Subject: [PATCH] Upgrade to rust 1.37.0 (#2786) --- .appveyor.yml | 2 +- .travis.yml | 2 +- cli/compilers/ts.rs | 4 ++-- cli/file_fetcher.rs | 4 ++-- core/isolate.rs | 2 +- tools/hyper_hello/hyper_hello.rs | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index cdee190b26..617a5c034f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,7 +12,7 @@ environment: DENO_BUILD_PATH: $(APPVEYOR_BUILD_FOLDER)\target\release DENO_THIRD_PARTY_PATH: $(APPVEYOR_BUILD_FOLDER)\third_party RELEASE_ARTIFACT: deno_win_x64.zip - RUST_VERSION: 1.36.0 + RUST_VERSION: 1.37.0 RUST_DIR: $(USERPROFILE)\rust-$(RUST_VERSION) CARGO_HOME: $(RUST_DIR)\cargo RUSTUP_HOME: $(RUST_DIR)\rustup diff --git a/.travis.yml b/.travis.yml index 5aef9e264b..3b389ff8f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ git: depth: 1 env: global: - - RUST_VERSION=1.36.0 + - RUST_VERSION=1.37.0 - CARGO_HOME=$TRAVIS_BUILD_DIR/third_party/rust_crates/ - RUSTUP_HOME=$HOME/.rustup/ - RUST_BACKTRACE=full diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs index 9855086b6c..4a697525ac 100644 --- a/cli/compilers/ts.rs +++ b/cli/compilers/ts.rs @@ -112,8 +112,8 @@ pub struct CompiledFileMetadata { pub version_hash: String, } -static SOURCE_PATH: &'static str = "source_path"; -static VERSION_HASH: &'static str = "version_hash"; +static SOURCE_PATH: &str = "source_path"; +static VERSION_HASH: &str = "version_hash"; impl CompiledFileMetadata { pub fn from_json_string(metadata_string: String) -> Option { diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index 0e69560efe..97fd0ad8fc 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -556,8 +556,8 @@ pub struct SourceCodeHeaders { pub redirect_to: Option, } -static MIME_TYPE: &'static str = "mime_type"; -static REDIRECT_TO: &'static str = "redirect_to"; +static MIME_TYPE: &str = "mime_type"; +static REDIRECT_TO: &str = "redirect_to"; impl SourceCodeHeaders { pub fn from_json_string(headers_string: String) -> Self { diff --git a/core/isolate.rs b/core/isolate.rs index 5d6088ca59..fe6e613c22 100644 --- a/core/isolate.rs +++ b/core/isolate.rs @@ -91,7 +91,7 @@ pub trait ImportStream: Stream { type DynImportStream = Box + Send>; -type DynImportFn = Fn(deno_dyn_import_id, &str, &str) -> DynImportStream; +type DynImportFn = dyn Fn(deno_dyn_import_id, &str, &str) -> DynImportStream; /// Wraps DynImportStream to include the deno_dyn_import_id, so that it doesn't /// need to be exposed. diff --git a/tools/hyper_hello/hyper_hello.rs b/tools/hyper_hello/hyper_hello.rs index dc4dceb06c..9491b07503 100644 --- a/tools/hyper_hello/hyper_hello.rs +++ b/tools/hyper_hello/hyper_hello.rs @@ -9,7 +9,7 @@ use hyper::service::service_fn_ok; use hyper::{Body, Response, Server}; use std::env; -static PHRASE: &'static [u8] = b"Hello World!"; +static PHRASE: &[u8] = b"Hello World!"; fn main() { let mut port: u16 = 4544;