Skip to content

Commit

Permalink
sl-std: Mark a few functions as "const"
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwuelker committed Mar 17, 2024
1 parent a771372 commit 5411212
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/sl-std/src/chars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ where
{
#[inline]
#[must_use]
pub fn new(source: T) -> Self {
pub const fn new(source: T) -> Self {
Self {
source,
pos: 0,
Expand All @@ -32,7 +32,7 @@ where

#[inline]
#[must_use]
pub fn position(&self) -> usize {
pub const fn position(&self) -> usize {
self.pos
}

Expand All @@ -44,7 +44,7 @@ where

#[inline]
#[must_use]
pub fn state(&self) -> State {
pub const fn state(&self) -> State {
self.state
}

Expand Down

0 comments on commit 5411212

Please sign in to comment.