aboutsummaryrefslogtreecommitdiff
path: root/src/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/macros.rs')
-rw-r--r--src/macros.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/macros.rs b/src/macros.rs
index 724ef5e..7a39dbd 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -16,9 +16,9 @@
// Copyright (C) 2022-2022 Fuwn <[email protected]>
// SPDX-License-Identifier: GPL-3.0-only
-use std::lazy::SyncLazy;
+use once_cell::sync::Lazy;
-pub static QUOTES: SyncLazy<Vec<String>> = SyncLazy::new(|| {
+pub static QUOTES: Lazy<Vec<String>> = Lazy::new(|| {
serde_json::from_str(include_str!("../content/json/quotes.json")).unwrap()
});
@@ -42,7 +42,7 @@ macro_rules! success {
body: &$body,
hits: &$crate::route::hits_from($context.url.path()),
quote: {
- use rand::seq::SliceRandom;
+ use rand::prelude::SliceRandom;
&$crate::macros::QUOTES
.choose(&mut rand::thread_rng())