Skip to content

Commit 2fa424b

Browse files
authored
Mark InstrusiveList::new() const to remove need for *Lock in statics (#337)
Reduce amount of code required to initialize and use an IntrusiveList by marking new const
1 parent 5edc49e commit 2fa424b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

embedded-service/src/intrusive_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl Default for IntrusiveList {
9393

9494
impl IntrusiveList {
9595
/// construct an empty intrusive list
96-
pub fn new() -> IntrusiveList {
96+
pub const fn new() -> IntrusiveList {
9797
IntrusiveList { head: Cell::new(None) }
9898
}
9999

0 commit comments

Comments
 (0)