From dd7e68128599bf8aa19040896335080ee89e6f69 Mon Sep 17 00:00:00 2001 From: jude Date: Thu, 22 Feb 2024 18:35:37 +0000 Subject: [PATCH] Update rust --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/consts.rs | 4 ++-- src/interval_parser.rs | 4 ---- src/time_parser.rs | 1 - web/src/routes/metrics.rs | 2 -- web/static/assets | 2 +- web/static/index.html | 2 +- 8 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 50b59c8..2968dff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2357,7 +2357,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] -name = "reminder_rs" +name = "reminder-rs" version = "1.7.0-rc1" dependencies = [ "base64 0.21.7", diff --git a/Cargo.toml b/Cargo.toml index 574cabf..1fd1f5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "reminder_rs" +name = "reminder-rs" version = "1.7.0-rc1" authors = ["Jude Southworth "] edition = "2021" diff --git a/src/consts.rs b/src/consts.rs index 72baf0d..0dfacf0 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -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! { diff --git a/src/interval_parser.rs b/src/interval_parser.rs index cbde4c3..461d92d 100644 --- a/src/interval_parser.rs +++ b/src/interval_parser.rs @@ -95,16 +95,12 @@ impl fmt::Display for Error { trait OverflowOp: Sized { fn mul(self, other: Self) -> Result; - fn add(self, other: Self) -> Result; } impl OverflowOp for u64 { fn mul(self, other: Self) -> Result { self.checked_mul(other).ok_or(Error::NumberOverflow) } - fn add(self, other: Self) -> Result { - self.checked_add(other).ok_or(Error::NumberOverflow) - } } #[derive(Copy, Clone)] diff --git a/src/time_parser.rs b/src/time_parser.rs index 2401d37..cc4c881 100644 --- a/src/time_parser.rs +++ b/src/time_parser.rs @@ -1,5 +1,4 @@ use std::{ - convert::TryFrom, fmt::{Display, Formatter, Result as FmtResult}, str::from_utf8, time::{SystemTime, UNIX_EPOCH}, diff --git a/web/src/routes/metrics.rs b/web/src/routes/metrics.rs index 0421264..e81785d 100644 --- a/web/src/routes/metrics.rs +++ b/web/src/routes/metrics.rs @@ -1,5 +1,3 @@ -use prometheus; - use crate::metrics::REGISTRY; #[get("/metrics")] diff --git a/web/static/assets b/web/static/assets index 28d98b0..73e7fa6 120000 --- a/web/static/assets +++ b/web/static/assets @@ -1 +1 @@ -/home/jude/reminder-bot/reminder-dashboard/dist/static/assets \ No newline at end of file +/home/jude/reminder-dashboard/dist/static/assets \ No newline at end of file diff --git a/web/static/index.html b/web/static/index.html index af9ba7b..d8876b2 120000 --- a/web/static/index.html +++ b/web/static/index.html @@ -1 +1 @@ -/home/jude/reminder-bot/reminder-dashboard/dist/index.html \ No newline at end of file +/home/jude/reminder-dashboard/dist/index.html \ No newline at end of file