mirror of https://github.com/spikecodes/libreddit
Deduplicate ThemeAssets
This commit is contained in:
parent
783d26f3df
commit
133d1f323d
|
@ -12,7 +12,6 @@ mod utils;
|
|||
|
||||
// Import Crates
|
||||
use clap::{Command, Arg};
|
||||
use rust_embed::RustEmbed;
|
||||
|
||||
use futures_lite::FutureExt;
|
||||
use hyper::{header::HeaderValue, Body, Request, Response};
|
||||
|
@ -20,7 +19,7 @@ use hyper::{header::HeaderValue, Body, Request, Response};
|
|||
mod client;
|
||||
use client::proxy;
|
||||
use server::RequestExt;
|
||||
use utils::{error, redirect};
|
||||
use utils::{error, redirect, ThemeAssets};
|
||||
|
||||
mod server;
|
||||
|
||||
|
@ -103,11 +102,6 @@ async fn style() -> Result<Response<Body>, String> {
|
|||
)
|
||||
}
|
||||
|
||||
#[derive(RustEmbed)]
|
||||
#[folder = "static/themes/"]
|
||||
#[include = "*.css"]
|
||||
struct ThemeAssets;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let matches = Command::new("Libreddit")
|
||||
|
|
|
@ -464,7 +464,7 @@ pub struct Preferences {
|
|||
#[derive(RustEmbed)]
|
||||
#[folder = "static/themes/"]
|
||||
#[include = "*.css"]
|
||||
struct ThemeAssets;
|
||||
pub struct ThemeAssets;
|
||||
|
||||
impl Preferences {
|
||||
// Build preferences from cookies
|
||||
|
|
Loading…
Reference in New Issue