Update rust
This commit is contained in:
@ -10,9 +10,9 @@ pub const CHARACTERS: &str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX
|
||||
const THEME_COLOR_FALLBACK: u32 = 0x8fb677;
|
||||
pub const MACRO_MAX_COMMANDS: usize = 5;
|
||||
|
||||
use poise::serenity_prelude::CreateAttachment;
|
||||
use std::{collections::HashSet, env, iter::FromIterator};
|
||||
use std::{collections::HashSet, env};
|
||||
|
||||
use poise::serenity_prelude::CreateAttachment;
|
||||
use regex::Regex;
|
||||
|
||||
lazy_static! {
|
||||
|
@ -95,16 +95,12 @@ impl fmt::Display for Error {
|
||||
|
||||
trait OverflowOp: Sized {
|
||||
fn mul(self, other: Self) -> Result<Self, Error>;
|
||||
fn add(self, other: Self) -> Result<Self, Error>;
|
||||
}
|
||||
|
||||
impl OverflowOp for u64 {
|
||||
fn mul(self, other: Self) -> Result<Self, Error> {
|
||||
self.checked_mul(other).ok_or(Error::NumberOverflow)
|
||||
}
|
||||
fn add(self, other: Self) -> Result<Self, Error> {
|
||||
self.checked_add(other).ok_or(Error::NumberOverflow)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
|
@ -1,5 +1,4 @@
|
||||
use std::{
|
||||
convert::TryFrom,
|
||||
fmt::{Display, Formatter, Result as FmtResult},
|
||||
str::from_utf8,
|
||||
time::{SystemTime, UNIX_EPOCH},
|
||||
|
Reference in New Issue
Block a user