diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc3e96cf..644ac35f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ env: # When updating this, also update: # - crates/teloxide-core/src/codegen.rs # - rust-toolchain.toml - rust_nightly: nightly-2022-12-23 + rust_nightly: nightly-2023-05-28 # When updating this, also update: # - **/README.md # - **/src/lib.rs @@ -88,7 +88,7 @@ jobs: toolchain: beta features: "--features full" - rust: nightly - toolchain: nightly-2022-12-23 + toolchain: nightly-2023-05-28 features: "--features full nightly" - rust: msrv toolchain: 1.64.0 diff --git a/crates/teloxide-core/src/codegen.rs b/crates/teloxide-core/src/codegen.rs index fe956bce..afde1663 100644 --- a/crates/teloxide-core/src/codegen.rs +++ b/crates/teloxide-core/src/codegen.rs @@ -23,7 +23,7 @@ use xshell::{cmd, Shell}; fn ensure_rustfmt(sh: &Shell) { // FIXME(waffle): find a better way to set toolchain - let toolchain = "nightly-2022-12-23"; + let toolchain = "nightly-2023-05-28"; let version = cmd!(sh, "rustup run {toolchain} rustfmt --version").read().unwrap_or_default(); @@ -36,7 +36,7 @@ fn ensure_rustfmt(sh: &Shell) { } pub fn reformat(text: String) -> String { - let toolchain = "nightly-2022-12-23"; + let toolchain = "nightly-2023-05-28"; let sh = Shell::new().unwrap(); ensure_rustfmt(&sh); diff --git a/crates/teloxide-core/src/net/download.rs b/crates/teloxide-core/src/net/download.rs index ac419a79..338fd547 100644 --- a/crates/teloxide-core/src/net/download.rs +++ b/crates/teloxide-core/src/net/download.rs @@ -12,10 +12,9 @@ use tokio::io::{AsyncWrite, AsyncWriteExt}; use crate::{errors::DownloadError, net::file_url}; /// A trait for downloading files from Telegram. -pub trait Download<'w> -/* FIXME(waffle): ideally, this lifetime ('w) shouldn't be here, but we can't help it without - * GATs */ -{ +// FIXME(waffle): ideally, this lifetime ('w) shouldn't be here, but we can't +// help it without GATs +pub trait Download<'w> { /// An error returned from [`download_file`](Self::download_file). type Err; diff --git a/crates/teloxide/examples/dispatching_features.rs b/crates/teloxide/examples/dispatching_features.rs index 6ce059d9..83efc6e9 100644 --- a/crates/teloxide/examples/dispatching_features.rs +++ b/crates/teloxide/examples/dispatching_features.rs @@ -40,7 +40,7 @@ async fn main() { .endpoint(|msg: Message, bot: Bot, cmd: MaintainerCommands| async move { match cmd { MaintainerCommands::Rand { from, to } => { - let mut rng = rand::rngs::OsRng::default(); + let mut rng = rand::rngs::OsRng; let value: u64 = rng.gen_range(from..=to); bot.send_message(msg.chat.id, value.to_string()).await?; diff --git a/crates/teloxide/src/dispatching.rs b/crates/teloxide/src/dispatching.rs index bb1e9d94..a4d9b6ce 100644 --- a/crates/teloxide/src/dispatching.rs +++ b/crates/teloxide/src/dispatching.rs @@ -229,7 +229,7 @@ pub mod update_listeners { /// /// [`teloxide::repls`]: crate::repls #[deprecated = "This module was moved. Use `teloxide::repls` instead."] -#[cfg(all(feature = "ctrlc_handler"))] +#[cfg(feature = "ctrlc_handler")] pub mod repls { pub use crate::repls::*; } diff --git a/crates/teloxide/src/lib.rs b/crates/teloxide/src/lib.rs index ffcd8f65..1a1c6797 100644 --- a/crates/teloxide/src/lib.rs +++ b/crates/teloxide/src/lib.rs @@ -69,7 +69,7 @@ pub use repls::{commands_repl, commands_repl_with_listener}; pub mod dispatching; pub mod error_handlers; pub mod prelude; -#[cfg(all(feature = "ctrlc_handler"))] +#[cfg(feature = "ctrlc_handler")] pub mod repls; pub mod stop; pub mod update_listeners; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 2cbd2d33..c58ff624 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2022-12-23" +channel = "nightly-2023-05-28" components = ["rustfmt", "clippy"] profile = "minimal"