Skip to content

Commit 78adbbd

Browse files
committed
Upgrade rustup to the 2021 edition
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
1 parent 5225e87 commit 78adbbd

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
authors = ["Daniel Silverstone <dsilvers@digital-scurf.org>", "Diggory Blake <diggsey@googlemail.com>"]
33
build = "build.rs"
44
description = "Manage multiple rust installations with ease"
5-
edition = "2018"
5+
edition = "2021"
66
homepage = "https://github.com/rust-lang/rustup"
77
keywords = ["rustup", "multirust", "install", "proxy"]
88
license = "MIT OR Apache-2.0"

ci/run.bash

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,25 @@ runtest () {
3636
cargo test --locked --release --target "$TARGET" "${FEATURES[@]}" "$@"
3737
}
3838

39+
run_download_pkg_test() {
40+
features=('--no-default-features' '--features' 'curl-backend,reqwest-backend,reqwest-default-tls')
41+
case "$TARGET" in
42+
# these platforms aren't supported by ring:
43+
powerpc* ) ;;
44+
mips* ) ;;
45+
riscv* ) ;;
46+
s390x* ) ;;
47+
aarch64-pc-windows-msvc ) ;;
48+
# default case, build with rustls enabled
49+
* ) features+=('--features' 'reqwest-rustls-tls') ;;
50+
esac
51+
52+
cargo test --locked --release --target "$TARGET" "${features[@]}" -p download
53+
}
54+
3955
if [ -z "$SKIP_TESTS" ]; then
4056
cargo run --locked --release --target "$TARGET" "${FEATURES[@]}" -- --dump-testament
41-
runtest -p download
57+
run_download_pkg_test
4258
runtest --bin rustup-init
4359
runtest --lib --all
4460
runtest --doc --all

download/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
authors = ["Brian Anderson <banderson@mozilla.com>"]
4-
edition = "2018"
4+
edition = "2021"
55
license = "MIT/Apache-2.0"
66
name = "download"
77
version = "0.6.9"

src/dist/manifest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,6 @@ impl Component {
529529
}
530530

531531
pub(crate) fn new_with_target(pkg_with_target: &str, is_extension: bool) -> Option<Self> {
532-
use std::convert::TryFrom;
533532
for (pos, _) in pkg_with_target.match_indices('-') {
534533
let pkg = &pkg_with_target[0..pos];
535534
let target = &pkg_with_target[pos + 1..];

0 commit comments

Comments
 (0)