aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cache.rs1
-rw-r--r--src/config.rs6
-rw-r--r--src/ctx.rs8
-rw-r--r--src/deserialize.rs6
-rw-r--r--src/http.rs1
-rw-r--r--src/main.rs7
6 files changed, 14 insertions, 15 deletions
diff --git a/src/cache.rs b/src/cache.rs
index cf612b6..aa06835 100644
--- a/src/cache.rs
+++ b/src/cache.rs
@@ -9,7 +9,6 @@ use std::sync::Arc;
use std::pin::Pin;
use tokio::sync::RwLock;
-
use reqwest::StatusCode;
#[derive(Debug)]
diff --git a/src/config.rs b/src/config.rs
index 69328b0..b242534 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -1,15 +1,9 @@
use std::collections::BTreeSet;
use std::sync::LazyLock;
use std::sync::Arc;
-use std::future::Future;
-use std::pin::Pin;
use std::time::*;
-use super::cache::AsyncCache;
-use super::deserialize::{GetRecentTracks, GetUserInfo, GetTrackInfo, Track, TrackStub, User};
-
use dotenv::var;
-use tokio::sync::RwLock;
use handlebars::{Handlebars, handlebars_helper};
use duration_str as ds;
diff --git a/src/ctx.rs b/src/ctx.rs
index 6e0d806..50e01bb 100644
--- a/src/ctx.rs
+++ b/src/ctx.rs
@@ -1,9 +1,11 @@
-use reqwest::StatusCode;
-use super::deserialize as de;
use std::sync::Arc;
use std::collections::BTreeMap;
-use crate::cache::font::FontQuery;
+
+use reqwest::StatusCode;
+
+use super::deserialize as de;
use super::config::CONFIG;
+use crate::cache::font::FontQuery;
pub mod model {
use std::sync::Arc;
diff --git a/src/deserialize.rs b/src/deserialize.rs
index 0134ae5..4a95b70 100644
--- a/src/deserialize.rs
+++ b/src/deserialize.rs
@@ -1,9 +1,9 @@
-use serde::{Deserialize, Deserializer, de};
-use serde_json::Value;
-
use std::collections::HashMap;
use std::sync::Arc;
+use serde::{Deserialize, Deserializer, de};
+use serde_json::Value;
+
fn str_num<'de, D, T>(d: D) -> Result<T, D::Error> where D: Deserializer<'de>, T: From<u64> {
struct Visitor;
impl<'v> de::Visitor<'v> for Visitor {
diff --git a/src/http.rs b/src/http.rs
index f0a609b..e3f29e6 100644
--- a/src/http.rs
+++ b/src/http.rs
@@ -1,4 +1,5 @@
use std::sync::LazyLock;
+
use reqwest::Client;
pub(crate) fn new() -> Client {
diff --git a/src/main.rs b/src/main.rs
index 38ee31f..d71f05c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,14 +1,17 @@
#![feature(lazy_cell)]
-use dotenv::var;
-use log::LevelFilter;
use std::collections::BTreeMap;
use std::fs::File;
use std::sync::Arc;
+
use lfm_embed::{CONFIG, ResponseCtx};
use lfm_embed::cache::font::FontQuery;
+
+use log::LevelFilter;
+use dotenv::var;
use warp::Filter;
+
#[derive(serde::Deserialize, Debug)]
#[serde(rename = "kebab-case")]
struct UserQuery {