Skip to content

Commit

Permalink
Update to Rust 1.70 (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka authored Jun 5, 2023
1 parent ec96358 commit 4f97b9f
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 39 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
test-64bits:
runs-on: ubuntu-latest
container:
image: rust:1.69
image: rust:1.70
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -39,7 +39,7 @@ jobs:
test-32bits:
runs-on: ubuntu-latest
container:
image: rust:1.69
image: rust:1.70
steps:
- run: apt-get update && apt install -y libc6-dev-i386
- uses: actions/checkout@v3
Expand All @@ -50,7 +50,7 @@ jobs:
wasm-node-check:
runs-on: ubuntu-latest
container:
image: rust:1.69
image: rust:1.70
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -65,7 +65,7 @@ jobs:
check-features:
runs-on: ubuntu-latest
container:
image: rust:1.69
image: rust:1.70
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
check-rustdoc-links:
runs-on: ubuntu-latest
container:
image: rust:1.69
image: rust:1.70
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
build-js-doc:
runs-on: ubuntu-latest
container:
image: rust:1.69
image: rust:1.70
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -82,7 +82,7 @@ jobs:
build-rust-doc:
runs-on: ubuntu-latest
container:
image: rust:1.69
image: rust:1.70
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -103,7 +103,7 @@ jobs:
build-tests-coverage:
runs-on: ubuntu-latest
container:
image: rust:1.69
image: rust:1.70
steps:
- run: apt update && apt install -y jq
- run: rustup component add llvm-tools-preview
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
npm-publish:
runs-on: ubuntu-latest
container:
image: rust:1.69
image: rust:1.70
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/periodic-cargo-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
cargo-update:
runs-on: ubuntu-latest
container:
image: rust:1.69
image: rust:1.70
steps:
- uses: actions/checkout@v3
- run: cargo update --workspace
Expand Down
21 changes: 0 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ edition = "2021"
repository = "https://github.com/smol-dot/smoldot"

[profile.dev]
debug = 1 # Default value is `2`, which contains the full debug info. `1` is enough for stack traces.
debug = 1 # Default value is `2`, which contains the full debug info. `1` is enough for stack traces. # TODO: use the named version after Cargo v1.71
opt-level = 2
panic = "abort"
[profile.dev.package."*"]
Expand Down
1 change: 0 additions & 1 deletion full-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ name = "full-node"
path = "src/main.rs"

[dependencies]
atty = "0.2.14"
blake2-rfc = { version = "0.2.18", default-features = false }
clap = { version = "4.3.1", default-features = false, features = ["color", "derive", "help", "std", "suggestions", "usage"] } # Note: enabling/disabling some features modifies the internal behavior of clap, be careful
ctrlc = "3.4.0"
Expand Down
4 changes: 2 additions & 2 deletions full-node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use smoldot::{
PeerId,
},
};
use std::{net::SocketAddr, path::PathBuf};
use std::{io, net::SocketAddr, path::PathBuf};

// Note: the doc-comments applied to this struct and its field are visible when the binary is
// started with `--help`.
Expand Down Expand Up @@ -140,7 +140,7 @@ impl core::str::FromStr for ColorChoice {
if s == "always" {
Ok(ColorChoice::Always)
} else if s == "auto" {
if atty::is(atty::Stream::Stderr) {
if io::IsTerminal::is_terminal(&io::stderr()) {
Ok(ColorChoice::Always)
} else {
Ok(ColorChoice::Never)
Expand Down
2 changes: 1 addition & 1 deletion full-node/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ mod network_service;
pub async fn run(cli_options: cli::CliOptionsRun) {
// Determine the actual CLI output by replacing `Auto` with the actual value.
let cli_output = if let cli::Output::Auto = cli_options.output {
if atty::is(atty::Stream::Stderr) && cli_options.log.is_empty() {
if io::IsTerminal::is_terminal(&io::stderr()) && cli_options.log.is_empty() {
cli::Output::Informant
} else {
cli::Output::Logs
Expand Down
4 changes: 2 additions & 2 deletions lib/src/json_rpc/requests_subscriptions/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ mod tests {
}

// Then drop the queue and make sure that there's no clone of `counter` remaining.
let _ = Arc::try_unwrap(queue).unwrap();
let () = Arc::try_unwrap(counter).unwrap();
let _ = Arc::into_inner(queue).unwrap();
let () = Arc::into_inner(counter).unwrap();
})
}
}
2 changes: 1 addition & 1 deletion wasm-node/javascript/prepare.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if (buildProfile != 'debug' && buildProfile != 'min-size-release')
// The Rust version is pinned because the wasi target is still unstable. Without pinning, it is
// possible for the wasm-js bindings to change between two Rust versions. Feel free to update
// this version pin whenever you like, provided it continues to build.
const rustVersion = '1.69.0';
const rustVersion = '1.70.0';

// Assume that the user has `rustup` installed and make sure that `rust_version` is available.
// Because `rustup install` requires an Internet connection, check whether the toolchain is
Expand Down

0 comments on commit 4f97b9f

Please sign in to comment.