mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-08 19:33:53 +01:00
Merge pull request #884 from teloxide/repin-nightly
Update pinned nightly
This commit is contained in:
commit
06595cef79
7 changed files with 11 additions and 12 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -19,7 +19,7 @@ env:
|
||||||
# When updating this, also update:
|
# When updating this, also update:
|
||||||
# - crates/teloxide-core/src/codegen.rs
|
# - crates/teloxide-core/src/codegen.rs
|
||||||
# - rust-toolchain.toml
|
# - rust-toolchain.toml
|
||||||
rust_nightly: nightly-2022-12-23
|
rust_nightly: nightly-2023-05-28
|
||||||
# When updating this, also update:
|
# When updating this, also update:
|
||||||
# - **/README.md
|
# - **/README.md
|
||||||
# - **/src/lib.rs
|
# - **/src/lib.rs
|
||||||
|
@ -88,7 +88,7 @@ jobs:
|
||||||
toolchain: beta
|
toolchain: beta
|
||||||
features: "--features full"
|
features: "--features full"
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
toolchain: nightly-2022-12-23
|
toolchain: nightly-2023-05-28
|
||||||
features: "--features full nightly"
|
features: "--features full nightly"
|
||||||
- rust: msrv
|
- rust: msrv
|
||||||
toolchain: 1.64.0
|
toolchain: 1.64.0
|
||||||
|
|
|
@ -23,7 +23,7 @@ use xshell::{cmd, Shell};
|
||||||
|
|
||||||
fn ensure_rustfmt(sh: &Shell) {
|
fn ensure_rustfmt(sh: &Shell) {
|
||||||
// FIXME(waffle): find a better way to set toolchain
|
// 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();
|
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 {
|
pub fn reformat(text: String) -> String {
|
||||||
let toolchain = "nightly-2022-12-23";
|
let toolchain = "nightly-2023-05-28";
|
||||||
|
|
||||||
let sh = Shell::new().unwrap();
|
let sh = Shell::new().unwrap();
|
||||||
ensure_rustfmt(&sh);
|
ensure_rustfmt(&sh);
|
||||||
|
|
|
@ -12,10 +12,9 @@ use tokio::io::{AsyncWrite, AsyncWriteExt};
|
||||||
use crate::{errors::DownloadError, net::file_url};
|
use crate::{errors::DownloadError, net::file_url};
|
||||||
|
|
||||||
/// A trait for downloading files from Telegram.
|
/// 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
|
||||||
/* FIXME(waffle): ideally, this lifetime ('w) shouldn't be here, but we can't help it without
|
// help it without GATs
|
||||||
* GATs */
|
pub trait Download<'w> {
|
||||||
{
|
|
||||||
/// An error returned from [`download_file`](Self::download_file).
|
/// An error returned from [`download_file`](Self::download_file).
|
||||||
type Err;
|
type Err;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ async fn main() {
|
||||||
.endpoint(|msg: Message, bot: Bot, cmd: MaintainerCommands| async move {
|
.endpoint(|msg: Message, bot: Bot, cmd: MaintainerCommands| async move {
|
||||||
match cmd {
|
match cmd {
|
||||||
MaintainerCommands::Rand { from, to } => {
|
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);
|
let value: u64 = rng.gen_range(from..=to);
|
||||||
|
|
||||||
bot.send_message(msg.chat.id, value.to_string()).await?;
|
bot.send_message(msg.chat.id, value.to_string()).await?;
|
||||||
|
|
|
@ -229,7 +229,7 @@ pub mod update_listeners {
|
||||||
///
|
///
|
||||||
/// [`teloxide::repls`]: crate::repls
|
/// [`teloxide::repls`]: crate::repls
|
||||||
#[deprecated = "This module was moved. Use `teloxide::repls` instead."]
|
#[deprecated = "This module was moved. Use `teloxide::repls` instead."]
|
||||||
#[cfg(all(feature = "ctrlc_handler"))]
|
#[cfg(feature = "ctrlc_handler")]
|
||||||
pub mod repls {
|
pub mod repls {
|
||||||
pub use crate::repls::*;
|
pub use crate::repls::*;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ pub use repls::{commands_repl, commands_repl_with_listener};
|
||||||
pub mod dispatching;
|
pub mod dispatching;
|
||||||
pub mod error_handlers;
|
pub mod error_handlers;
|
||||||
pub mod prelude;
|
pub mod prelude;
|
||||||
#[cfg(all(feature = "ctrlc_handler"))]
|
#[cfg(feature = "ctrlc_handler")]
|
||||||
pub mod repls;
|
pub mod repls;
|
||||||
pub mod stop;
|
pub mod stop;
|
||||||
pub mod update_listeners;
|
pub mod update_listeners;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2022-12-23"
|
channel = "nightly-2023-05-28"
|
||||||
components = ["rustfmt", "clippy"]
|
components = ["rustfmt", "clippy"]
|
||||||
profile = "minimal"
|
profile = "minimal"
|
||||||
|
|
Loading…
Reference in a new issue