Skip to content

Commit

Permalink
Merge pull request #46 from stifskere/main
Browse files Browse the repository at this point in the history
fix: re add lazy static
  • Loading branch information
SergioRibera authored Nov 18, 2024
2 parents 021d239 + 09218ed commit 08f5b57
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ tokio = "1.26.0"
tracing = "0.1.37"
once_cell = "1.18.0"
urlencoding = "2.1.3"
lazy_static = "1.5.0"
10 changes: 5 additions & 5 deletions src/bot/events/read_github_links.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use lazy_static::lazy_static;
use poise::serenity_prelude::{ButtonStyle, ComponentInteraction, Context, CreateButton, CreateInteractionResponse, CreateInteractionResponseMessage, CreateMessage, Message, MESSAGE_CODE_LIMIT};
use regex::{Captures, Regex};
use reqwest::get;
use std::collections::{HashMap, HashSet};
use std::option::Option;
use std::sync::LazyLock;

static COMMENT_TEMPLATES: LazyLock<HashMap<&'static str, &'static str>> = LazyLock::new(|| {
HashMap::from([
lazy_static! {
static ref COMMENT_TEMPLATES: HashMap<&'static str, &'static str> = HashMap::from([
("c", "// {}"),
("cpp", "// {}"),
("cs", "// {}"),
Expand Down Expand Up @@ -44,8 +44,8 @@ static COMMENT_TEMPLATES: LazyLock<HashMap<&'static str, &'static str>> = LazyLo
("yml", "# {}"),
("md", "[comment]: # ({})"),
("lhs", "-- {}"),
])
});
]);
}

pub enum RangeOrIndex {
Language(String),
Expand Down
2 changes: 0 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(lazy_cell)]

pub use poise::serenity_prelude as serenity;
pub use secrets::CangrebotSecrets;

Expand Down

0 comments on commit 08f5b57

Please sign in to comment.