weh
This commit is contained in:
parent
60d4160033
commit
138191227f
|
@ -58,7 +58,7 @@ fn NowPlayingImpl::from_class(
|
||||||
}
|
}
|
||||||
//clang-format on
|
//clang-format on
|
||||||
|
|
||||||
fn NowPlayingImpl::to_class() const -> NowPlaying { return {enabled}; }
|
fn NowPlayingImpl::to_class() const -> NowPlaying { return {enabled.value_or(false)}; }
|
||||||
|
|
||||||
fn ConfigImpl::from_class(const Config& config) noexcept -> ConfigImpl {
|
fn ConfigImpl::from_class(const Config& config) noexcept -> ConfigImpl {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -61,20 +61,20 @@ class Weather {
|
||||||
|
|
||||||
struct WeatherOutput {
|
struct WeatherOutput {
|
||||||
Clouds clouds;
|
Clouds clouds;
|
||||||
Main main;
|
|
||||||
Sys sys;
|
|
||||||
Wind wind;
|
|
||||||
isize timezone;
|
isize timezone;
|
||||||
isize visibility;
|
isize visibility;
|
||||||
|
Main main;
|
||||||
rfl::Rename<"coord", Coords> coords;
|
rfl::Rename<"coord", Coords> coords;
|
||||||
std::optional<Precipitation> rain;
|
std::optional<Precipitation> rain;
|
||||||
std::optional<Precipitation> snow;
|
std::optional<Precipitation> snow;
|
||||||
std::string base;
|
std::string base;
|
||||||
std::string name;
|
std::string name;
|
||||||
std::vector<Condition> weather;
|
std::vector<Condition> weather;
|
||||||
|
Sys sys;
|
||||||
usize cod;
|
usize cod;
|
||||||
usize dt;
|
usize dt;
|
||||||
usize id;
|
usize id;
|
||||||
|
Wind wind;
|
||||||
};
|
};
|
||||||
|
|
||||||
using Location = std::variant<std::string, Coords>;
|
using Location = std::variant<std::string, Coords>;
|
||||||
|
@ -132,7 +132,7 @@ class NowPlaying {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct NowPlayingImpl {
|
struct NowPlayingImpl {
|
||||||
bool enabled;
|
std::optional<bool> enabled;
|
||||||
|
|
||||||
static fn from_class(const NowPlaying& now_playing
|
static fn from_class(const NowPlaying& now_playing
|
||||||
) noexcept -> NowPlayingImpl;
|
) noexcept -> NowPlayingImpl;
|
||||||
|
|
Loading…
Reference in a new issue