diff options
| author | seth <[email protected]> | 2024-02-18 18:30:42 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2024-02-18 18:38:30 -0500 |
| commit | c6446aa74006ab73059e316917791c5230d1e897 (patch) | |
| tree | d9d74191a7f220a275a6fb1341bd894ba3f2372f /src/main.rs | |
| parent | db362aefe343e2cb27d6c01c89464b0a8100b295 (diff) | |
use newer eyre directly
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index d2ba8e2..806c7b3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,9 +5,9 @@ use std::sync::Arc; use std::time::Duration; -use color_eyre::eyre::{eyre, Context as _, Report, Result}; -use color_eyre::owo_colors::OwoColorize; +use eyre::{eyre, Context as _, Report, Result}; use log::{info, warn}; +use owo_colors::OwoColorize; use poise::serenity_prelude as serenity; use poise::{EditTracker, Framework, FrameworkOptions, PrefixFrameworkOptions}; use redis::ConnectionLike; @@ -32,8 +32,8 @@ pub struct Data { impl Data { pub fn new() -> Result<Self> { - let redis_url = std::env::var("REDIS_URL") - .wrap_err_with(|| "Couldn't find Redis URL in environment!")?; + let redis_url = + std::env::var("REDIS_URL").wrap_err("Couldn't find Redis URL in environment!")?; let storage = Storage::new(&redis_url)?; @@ -78,8 +78,8 @@ async fn handle_shutdown(shard_manager: Arc<serenity::ShardManager>, reason: &st #[tokio::main] async fn main() -> Result<()> { - dotenvy::dotenv().ok(); color_eyre::install()?; + dotenvy::dotenv().ok(); env_logger::init(); let token = std::env::var("TOKEN").wrap_err_with(|| "Couldn't find token in environment!")?; |
