Skip to content

Commit 4d3a6ea

Browse files
Run basic 2018 edition fix
In order to use 2018 features we need the edition to be updated. This commit is the result of running: cargo fix --edition -p rustup -p rustup-dist -p rustup-mock -p rustup-utils -p download And then adding 'edition = "2018"' to each requisite Cargo.toml
1 parent 8ec1fea commit 4d3a6ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+117
-112
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
name = "rustup"
44
version = "1.16.0"
5+
edition = "2018"
56
authors = [ "Diggory Blake <diggsey@googlemail.com>" ]
67
description = "Manage multiple rust installations with ease"
78

src/download/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
name = "download"
44
version = "0.4.0"
5+
edition = "2018"
56
authors = [ "Brian Anderson <banderson@mozilla.com>" ]
67

78
license = "MIT/Apache-2.0"

src/download/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use url::Url;
1414
use std::path::Path;
1515

1616
mod errors;
17-
pub use errors::*;
17+
pub use crate::errors::*;
1818

1919
#[derive(Debug, Copy, Clone)]
2020
pub enum Backend {
@@ -136,7 +136,7 @@ pub mod curl {
136136
extern crate curl;
137137

138138
use self::curl::easy::Easy;
139-
use errors::*;
139+
use crate::errors::*;
140140
use std::cell::RefCell;
141141
use std::str;
142142
use std::time::Duration;
@@ -256,7 +256,7 @@ pub mod reqwest_be {
256256

257257
use std::io;
258258
use std::time::Duration;
259-
use errors::*;
259+
use crate::errors::*;
260260
use url::Url;
261261
use super::Event;
262262
use reqwest::{header, Client, Proxy, Response};

src/download/tests/download-curl-resume.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use url::Url;
1010
use download::*;
1111

1212
mod support;
13-
use support::{file_contents, serve_file, tmp_dir, write_file};
13+
use crate::support::{file_contents, serve_file, tmp_dir, write_file};
1414

1515
#[test]
1616
fn partially_downloaded_file_gets_resumed_from_byte_offset() {

src/download/tests/download-reqwest-resume.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use url::Url;
1010
use download::*;
1111

1212
mod support;
13-
use support::{file_contents, serve_file, tmp_dir, write_file};
13+
use crate::support::{file_contents, serve_file, tmp_dir, write_file};
1414

1515
#[test]
1616
fn resume_partial_from_file_url() {

src/rustup-cli/common.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
33
use rustup::{self, Cfg, Notification, Toolchain, UpdateStatus};
44
use rustup::telemetry_analysis::TelemetryAnalysis;
5-
use errors::*;
5+
use crate::errors::*;
66
use rustup_utils::utils;
77
use rustup_utils::notify::NotificationLevel;
8-
use self_update;
8+
use crate::self_update;
99
use std::io::{BufRead, BufReader, Write};
1010
use std::process::{Command, Stdio};
1111
use std::path::Path;
1212
use std::{cmp, iter};
1313
use std::sync::Arc;
1414
use std::time::Duration;
1515
use std;
16-
use term2;
16+
use crate::term2;
1717
use wait_timeout::ChildExt;
1818

1919
pub fn confirm(question: &str, default: bool) -> Result<bool> {
@@ -104,7 +104,7 @@ pub fn read_line() -> Result<String> {
104104
}
105105

106106
pub fn set_globals(verbose: bool) -> Result<Cfg> {
107-
use download_tracker::DownloadTracker;
107+
use crate::download_tracker::DownloadTracker;
108108
use std::cell::RefCell;
109109

110110
let download_tracker = RefCell::new(DownloadTracker::new());

src/rustup-cli/log.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use term2;
1+
use crate::term2;
22
use std::fmt;
33
use std::io::Write;
44

src/rustup-cli/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ mod help;
5858
use std::alloc::System;
5959
use std::env;
6060
use std::path::PathBuf;
61-
use errors::*;
61+
use crate::errors::*;
6262
use rustup_dist::dist::TargetTriple;
6363
use rustup::env_var::RUST_RECURSION_COUNT_MAX;
6464

src/rustup-cli/proxy_mode.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
use common::set_globals;
1+
use crate::common::set_globals;
22
use rustup::Cfg;
3-
use errors::*;
3+
use crate::errors::*;
44
use rustup_utils::utils::{self, ExitCode};
55
use rustup::command::run_command_for_dir;
66
use std::env;
77
use std::ffi::OsString;
88
use std::path::PathBuf;
99
use std::process;
10-
use job;
10+
use crate::job;
1111

1212
pub fn main() -> Result<()> {
13-
::self_update::cleanup_self_updater()?;
13+
crate::self_update::cleanup_self_updater()?;
1414

1515
let ExitCode(c) = {
1616
let _setup = job::setup();

src/rustup-cli/rustup_mode.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
use clap::{App, AppSettings, Arg, ArgGroup, ArgMatches, Shell, SubCommand};
2-
use common;
2+
use crate::common;
33
use rustup::{command, Cfg, Toolchain};
44
use rustup::settings::TelemetryMode;
5-
use errors::*;
5+
use crate::errors::*;
66
use rustup_dist::manifest::Component;
77
use rustup_dist::dist::{PartialTargetTriple, PartialToolchainDesc, TargetTriple};
88
use rustup_utils::utils::{self, ExitCode};
9-
use self_update;
9+
use crate::self_update;
1010
use std::path::Path;
1111
use std::process::{self, Command};
1212
use std::iter;
1313
use std::error::Error;
14-
use term2;
14+
use crate::term2;
1515
use std::io::{self, Write};
16-
use help::*;
16+
use crate::help::*;
1717

1818
pub fn main() -> Result<()> {
19-
::self_update::cleanup_self_updater()?;
19+
crate::self_update::cleanup_self_updater()?;
2020

2121
let ref matches = cli().get_matches();
2222
let verbose = matches.is_present("verbose");

0 commit comments

Comments
 (0)