Mention open issues in documentation; tweak docs

This commit is contained in:
Paul van Tilburg 2022-02-15 13:14:51 +01:00
parent c76e2315b5
commit b2f63db6b4
2 changed files with 11 additions and 9 deletions

View File

@ -10,9 +10,11 @@ use crate::providers;
use crate::providers::buienradar::Item as BuienradarItem;
use crate::providers::luchtmeetnet::Item as LuchtmeetnetItem;
/// The current for a specific location.
/// The current forecast for a specific location.
///
/// Only the metrics asked for are included as well as the position and current time.
///
// TODO: Fill in missing data (#3)
#[derive(Debug, Default, Serialize)]
#[serde(crate = "rocket::serde")]
pub(crate) struct Forecast {
@ -59,19 +61,18 @@ pub(crate) struct Forecast {
}
impl Forecast {
fn new(lat: f64, lon: f64) -> Self {
let time = chrono::Utc::now().timestamp();
fn new(position: Position) -> Self {
Self {
lat,
lon,
time,
lat: position.lat,
lon: position.lon,
time: chrono::Utc::now().timestamp(),
..Default::default()
}
}
}
/// The supported metrics.
/// The supported forecast metrics.
///
/// This is used for selecting which metrics should be calculated & returned.
#[allow(clippy::upper_case_acronyms)]

View File

@ -3,8 +3,9 @@
//! This module provides a task that keeps maps up-to-date using a maps-specific refresh interval.
//! It stores all the maps as [`DynamicImage`]s in memory.
// TODO: Allow dead code until either precipitation maps get used or dumped.
// TODO: Allow dead code until either precipitation maps get used or dumped (#8).
#![allow(dead_code)]
use std::sync::{Arc, Mutex};
use chrono::DurationRound;