diff --git a/src/modules/api.rs b/src/modules/api.rs index 260a8ef..3392c56 100644 --- a/src/modules/api.rs +++ b/src/modules/api.rs @@ -42,7 +42,7 @@ impl<'a> ApiQuery<'a> { } } - pub fn location(api: ApiName, address: &'a str, language: &'a str) -> Self { + pub const fn location(api: ApiName, address: &'a str, language: &'a str) -> Self { Self { api, address, language } } diff --git a/src/modules/display/border.rs b/src/modules/display/border.rs index 9436508..49404ba 100644 --- a/src/modules/display/border.rs +++ b/src/modules/display/border.rs @@ -14,7 +14,7 @@ pub enum Border { } impl Border { - pub fn fmt<'a>(&self, style: &BorderStyle) -> &'a str { + pub const fn fmt<'a>(&self, style: &BorderStyle) -> &'a str { match self { Self::TL => match style { BorderStyle::single => "┌", diff --git a/src/modules/display/wind.rs b/src/modules/display/wind.rs index b618cae..ea9d1b0 100644 --- a/src/modules/display/wind.rs +++ b/src/modules/display/wind.rs @@ -30,7 +30,7 @@ impl WindDirection { Ok(direction) } - pub fn get_icon(&self) -> char { + pub const fn get_icon(&self) -> char { match *self { Self::N => '', Self::NE => '',