From 325bf0ad3a49eee2a493e578033f135355780b2b Mon Sep 17 00:00:00 2001 From: guoweikang Date: Tue, 22 Oct 2024 13:40:33 +0800 Subject: [PATCH] rename repo to linked_list_r4l -------- 1 rename repo to linked_list_r4l 2 change to pub impl for node 3 const fn Signed-off-by: guoweikang --- Cargo.toml | 2 +- README.md | 2 +- src/lib.rs | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f60cb60..d6a6f69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ authors = ["Wedson Almeida Filho ", "WeiKang Guo Self { + pub const fn new(inner: $type) -> Self { Self { inner, links: $crate::Links::new(), @@ -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 } } @@ -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(), @@ -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 } }