Skip to content

Commit

Permalink
use const for more func
Browse files Browse the repository at this point in the history
Signed-off-by: guoweikang <[email protected]>
  • Loading branch information
guoweikang committed Oct 21, 2024
1 parent 606187d commit 33d763c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/raw_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ struct CommonCursor<G: GetLinks> {
}

impl<G: GetLinks> CommonCursor<G> {
fn new(cur: Option<NonNull<G::EntryType>>) -> Self {
const fn new(cur: Option<NonNull<G::EntryType>>) -> Self {
Self { cur }
}

Expand Down Expand Up @@ -419,7 +419,7 @@ pub(crate) struct Iterator<'a, G: GetLinks> {
}

impl<'a, G: GetLinks> Iterator<'a, G> {
fn new(cursor_front: Cursor<'a, G>, cursor_back: Cursor<'a, G>) -> Self {
const fn new(cursor_front: Cursor<'a, G>, cursor_back: Cursor<'a, G>) -> Self {
Self {
cursor_front,
cursor_back,
Expand Down

0 comments on commit 33d763c

Please sign in to comment.