Skip to content

Commit

Permalink
use 'const'
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades committed Apr 9, 2023
1 parent 05d2187 commit 832cbd0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/modules/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}

Expand Down
2 changes: 1 addition & 1 deletion src/modules/display/border.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => "┌",
Expand Down
2 changes: 1 addition & 1 deletion src/modules/display/wind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => '',
Expand Down

0 comments on commit 832cbd0

Please sign in to comment.