From 97044dc90b3386ee2328a2aef91d7bd3a5b8fa36 Mon Sep 17 00:00:00 2001 From: Miyoshi-Ryota Date: Sat, 17 Aug 2024 22:08:39 +0900 Subject: [PATCH] chore: Update rust version to fix complie error a following error happens if we use v1.71.0 to compile: error[E0659]: `cbc` is ambiguous --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:26:5 | 26 | use cbc::CbcWrapper; | ^^^ ambiguous name | = note: ambiguous because of multiple potential import sources = note: `cbc` could refer to a crate passed with `--extern` = help: use `::cbc` to refer to this crate unambiguously note: `cbc` could also refer to the module defined here --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:38:1 | 38 | pub(crate) mod cbc; | ^^^^^^^^^^^^^^^^^^^ = help: use `self::cbc` to refer to this module unambiguously error: future cannot be sent between threads safely --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/server/mod.rs:683:29 | 683 | let join = tokio::spawn(session.run(stream, handler)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `run` is not `Send` | = help: the trait `for<'a> std::marker::Sync` is not implemented for `(dyn cipher::OpeningKey + std::marker::Send + 'a)` note: future is not `Send` as this value is used across an await --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:265:10 | 264 | .read_exact(&mut buffer.buffer[cipher.packet_length_to_read_for_block_length()..]) | ------ has type `&(dyn cipher::OpeningKey + std::marker::Send + 'a)` which is not `Send` 265 | .await?; | ^^^^^ - `cipher` is later dropped here | | | await occurs here, with `cipher` maybe used later help: consider moving this into a `let` binding to create a shorter lived borrow --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:264:40 | 264 | .read_exact(&mut buffer.buffer[cipher.packet_length_to_read_for_block_length()..]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `tokio::spawn` --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/task/spawn.rs:167:21 | 165 | pub fn spawn(future: F) -> JoinHandle | ----- required by a bound in this function 166 | where 167 | F: Future + Send + 'static, | ^^^^ required by this bound in `spawn` error: future cannot be sent between threads safely --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/client/mod.rs:723:29 | 723 | let join = tokio::spawn(session.run(stream, handler, Some(encrypted_signal))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `run` is not `Send` | = help: the trait `for<'a> std::marker::Sync` is not implemented for `(dyn cipher::OpeningKey + std::marker::Send + 'a)` note: future is not `Send` as this value is used across an await --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:265:10 | 264 | .read_exact(&mut buffer.buffer[cipher.packet_length_to_read_for_block_length()..]) | ------ has type `&(dyn cipher::OpeningKey + std::marker::Send + 'a)` which is not `Send` 265 | .await?; | ^^^^^ - `cipher` is later dropped here | | | await occurs here, with `cipher` maybe used later help: consider moving this into a `let` binding to create a shorter lived borrow --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:264:40 | 264 | .read_exact(&mut buffer.buffer[cipher.packet_length_to_read_for_block_length()..]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `tokio::spawn` --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/task/spawn.rs:167:21 | 165 | pub fn spawn(future: F) -> JoinHandle | ----- required by a bound in this function 166 | where 167 | F: Future + Send + 'static, | ^^^^ required by this bound in `spawn` For more information about this error, try `rustc --explain E0659`. error: could not compile `russh` (lib) due to 3 previous errors warning: build failed, waiting for other jobs to finish... --- tests/async-ssh2-tokio/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/async-ssh2-tokio/Dockerfile b/tests/async-ssh2-tokio/Dockerfile index e43b9c9..6c40e02 100644 --- a/tests/async-ssh2-tokio/Dockerfile +++ b/tests/async-ssh2-tokio/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.71.0 +FROM rust:1.80.0 ENV ASYNC_SSH2_TEST_HOST_IP=10.10.10.2 ENV ASYNC_SSH2_TEST_HOST_USER=root