mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
Remove the useless TransitiveArc from the serve binary
This commit is contained in:
parent
edc06a97d6
commit
a4e0f3f724
@ -4,7 +4,6 @@ use std::fs::File;
|
||||
use std::net::SocketAddr;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
|
||||
use askama_warp::Template;
|
||||
@ -58,21 +57,6 @@ fn highlight_string(string: &str, words: &HashSet<String>) -> String {
|
||||
output
|
||||
}
|
||||
|
||||
// TODO find a better way or move this elsewhere
|
||||
struct TransitiveArc<T>(Arc<T>);
|
||||
|
||||
impl<T: AsRef<[u8]>> AsRef<[u8]> for TransitiveArc<T> {
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
self.0.as_ref().as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Clone for TransitiveArc<T> {
|
||||
fn clone(&self) -> TransitiveArc<T> {
|
||||
TransitiveArc(self.0.clone())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "index.html")]
|
||||
struct IndexTemplate {
|
||||
|
Loading…
Reference in New Issue
Block a user