Skip to content

Commit

Permalink
rename repo to linked_list_r4l
Browse files Browse the repository at this point in the history
--------
1 rename repo to linked_list_r4l
2 change to pub impl for node
3 const fn

Signed-off-by: guoweikang <[email protected]>
  • Loading branch information
guoweikang committed Oct 22, 2024
1 parent 3509ccf commit 325bf0a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Wedson Almeida Filho <[email protected]>", "WeiKang Guo <guoweikan
description = "Linked lists that supports arbitrary removal in constant time"
license = "GPL-2.0-or-later"
homepage = "https://github.com/arceos-org/arceos"
repository = "https://github.com/arceos-org/linked_list"
repository = "https://github.com/arceos-org/linked_list_r4l"
documentation = "https://docs.rs/linked_list_r4l"
keywords = ["list"]
categories = ["no-std", "rust-patterns"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Crates.io](https://img.shields.io/crates/v/linked_list_r4l)](https://crates.io/crates/linked_list_r4l)
[![Doc.rs](https://docs.rs/linked_list_r4l/badge.svg)](https://docs.rs/linked_list_r4l)
[![CI](https://github.com/arceos-org/linked_list/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/arceos-org/linked_list/actions/workflows/ci.yml)
[![CI](https://github.com/arceos-org/linked_list_r4l/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/arceos-org/linked_list_r4l/actions/workflows/ci.yml)

Linked lists that supports arbitrary removal in constant time.

Expand Down
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ macro_rules! __def_node_internal {

impl $name {
#[doc = "Create a node"]
$vis const fn new(inner: $type) -> Self {
pub const fn new(inner: $type) -> Self {
Self {
inner,
links: $crate::Links::new(),
Expand All @@ -36,13 +36,13 @@ macro_rules! __def_node_internal {

#[inline]
#[doc = "Return the referece of wrapped inner"]
$vis const fn inner(&self) -> &$type {
pub const fn inner(&self) -> &$type {
&self.inner
}

#[inline]
#[doc = "Consumes the `node`, returning the wrapped inner"]
$vis fn into_inner(self) -> $type {
pub const fn into_inner(self) -> $type {
self.inner
}
}
Expand Down Expand Up @@ -75,7 +75,7 @@ macro_rules! __def_node_internal {

impl<$gen> $name<$gen> {
#[doc = "Create a node"]
$vis const fn new(inner: $type) -> Self {
pub const fn new(inner: $type) -> Self {
Self {
inner,
links: $crate::Links::new(),
Expand All @@ -84,13 +84,13 @@ macro_rules! __def_node_internal {

#[inline]
#[doc = "Return the referece of wrapped inner"]
$vis const fn inner(&self) -> &$type {
pub const fn inner(&self) -> &$type {
&self.inner
}

#[inline]
#[doc = "Consumes the `node`, returning the wrapped inner"]
$vis fn into_inner(self) -> $type {
pub fn into_inner(self) -> $type {
self.inner
}
}
Expand Down

0 comments on commit 325bf0a

Please sign in to comment.