Skip to content

Commit

Permalink
Use ahash
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Dec 2, 2023
1 parent ff9146a commit 665ca41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 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 kitsune/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ homepage = "https://joinkitsune.org"
build = "build.rs"

[dependencies]
ahash = "0.8.6"
athena = { path = "../lib/athena" }
argon2 = { version = "0.5.2", features = ["std"] }
askama = { version = "0.12.1", features = [
Expand Down
5 changes: 3 additions & 2 deletions kitsune/src/http/handler/public.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
use ahash::AHashMap;
use axum::{extract::Path, routing, Router, TypedHeader};
use axum_extra::either::Either;
use headers::ContentType;
use http::StatusCode;
use include_dir::include_dir;
use mime::Mime;
use once_cell::sync::Lazy;
use std::{collections::HashMap, path::Path as FsPath, sync::RwLock};
use std::{path::Path as FsPath, sync::RwLock};

static PUBLIC_DIR: include_dir::Dir<'_> = include_dir!("public");
static PUBLIC_DIR_MIME_TYPE: Lazy<RwLock<HashMap<&'static FsPath, Mime>>> =
static PUBLIC_DIR_MIME_TYPE: Lazy<RwLock<AHashMap<&'static FsPath, Mime>>> =
Lazy::new(RwLock::default);

#[allow(clippy::unused_async)]
Expand Down

0 comments on commit 665ca41

Please sign in to comment.