summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-01-03 10:36:21 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-01-03 10:37:32 +0100
commit709eba5cfa7adba9af3611220fc9c4c28fcded1e (patch)
treed21a5f7d1baf65e2f71adbece3fbc13269ed74d4 /src/main.rs
parente503e291c9865eca6337fedd850e6bbeeb0934f7 (diff)
Make {Search, Query}Response not have public fieldsupdate
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index b97a595..dd48132 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -57,7 +57,7 @@ fn search(data : Json<Search>, config: State<Config>) -> Json<SearchResponse> {
debug!("handling search request: {:?}", data.0);
Json(
- SearchResponse(
+ SearchResponse::from(
(*config.all_aliases()).clone()
)
)
@@ -77,13 +77,13 @@ fn query(data: Json<Query>, config: State<Config>) -> Result<Json<QueryResponse>
Ok(
Json(
- QueryResponse{
- 0 : hash_map_iter(
+ QueryResponse::from({
+ hash_map_iter(
hash_map_targets(&config, data.0.targets)?,
data.0.range.from.timestamp(),
data.0.range.to.timestamp()
)?
- }
+ })
)
)
}