From 0d9ec2f8d27d509a2d5c04c9a4ffa923799935e5 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Wed, 17 Dec 2025 12:35:21 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Elimina=20anotaciones=20#[inline?= =?UTF-8?q?]=20para=20evitar=20abuso?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/pagetop-bootsier/src/theme/aux/border.rs | 1 - extensions/pagetop-bootsier/src/theme/aux/breakpoint.rs | 4 ++-- extensions/pagetop-bootsier/src/theme/aux/button.rs | 2 -- extensions/pagetop-bootsier/src/theme/aux/color.rs | 6 ++---- extensions/pagetop-bootsier/src/theme/aux/layout.rs | 4 ++-- extensions/pagetop-bootsier/src/theme/aux/rounded.rs | 4 ++-- extensions/pagetop-bootsier/src/theme/classes/border.rs | 1 - extensions/pagetop-bootsier/src/theme/classes/color.rs | 2 -- extensions/pagetop-bootsier/src/theme/classes/layout.rs | 2 -- extensions/pagetop-bootsier/src/theme/classes/rounded.rs | 1 - extensions/pagetop-bootsier/src/theme/container/props.rs | 1 - extensions/pagetop-bootsier/src/theme/dropdown/props.rs | 7 +++---- extensions/pagetop-bootsier/src/theme/image/props.rs | 3 +-- 13 files changed, 12 insertions(+), 26 deletions(-) diff --git a/extensions/pagetop-bootsier/src/theme/aux/border.rs b/extensions/pagetop-bootsier/src/theme/aux/border.rs index 3bd705e7..44d24b0e 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/border.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/border.rs @@ -64,7 +64,6 @@ impl BorderColor { /// assert_eq!(BorderColor::Black.to_class(), "border-black"); /// assert_eq!(BorderColor::Default.to_class(), ""); /// ``` - #[inline] pub fn to_class(self) -> String { if let Some(suffix) = self.suffix() { let base_len = match self { diff --git a/extensions/pagetop-bootsier/src/theme/aux/breakpoint.rs b/extensions/pagetop-bootsier/src/theme/aux/breakpoint.rs index ce7998e7..992f8525 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/breakpoint.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/breakpoint.rs @@ -82,8 +82,8 @@ impl BreakPoint { /// let bp = BreakPoint::LG; /// assert_eq!(bp.class_with("", "3"), ""); /// ``` - #[inline] - pub(crate) fn class_with(self, prefix: &str, suffix: &str) -> String { + #[doc(hidden)] + pub fn class_with(self, prefix: &str, suffix: &str) -> String { if prefix.is_empty() { return String::new(); } diff --git a/extensions/pagetop-bootsier/src/theme/aux/button.rs b/extensions/pagetop-bootsier/src/theme/aux/button.rs index 721c2bec..b32bd17d 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/button.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/button.rs @@ -65,7 +65,6 @@ impl ButtonColor { /// assert_eq!(ButtonColor::Link.to_class(), "btn-link"); /// assert_eq!(ButtonColor::Default.to_class(), ""); /// ``` - #[inline] pub fn to_class(self) -> String { match self { Self::Default => String::new(), @@ -132,7 +131,6 @@ impl ButtonSize { /// assert_eq!(ButtonSize::Large.to_class(), "btn-lg"); /// assert_eq!(ButtonSize::Default.to_class(), ""); /// ``` - #[inline] pub fn to_class(self) -> String { match self { Self::Default => String::new(), diff --git a/extensions/pagetop-bootsier/src/theme/aux/color.rs b/extensions/pagetop-bootsier/src/theme/aux/color.rs index b1372104..f49c36b6 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/color.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/color.rs @@ -139,8 +139,8 @@ impl Opacity { /// assert_eq!(Opacity::SemiTransparent.class_with("text"), "text-opacity-25"); /// assert_eq!(Opacity::Default.class_with("bg"), ""); /// ``` - #[inline] - pub(crate) fn class_with(self, prefix: &str) -> String { + #[doc(hidden)] + pub fn class_with(self, prefix: &str) -> String { if let Some(suffix) = self.suffix() { let base_len = if prefix.is_empty() { Self::OPACITY.len() @@ -253,7 +253,6 @@ impl ColorBg { /// assert_eq!(ColorBg::Transparent.to_class(), "bg-transparent"); /// assert_eq!(ColorBg::Default.to_class(), ""); /// ``` - #[inline] pub fn to_class(self) -> String { if let Some(suffix) = self.suffix() { let base_len = match self { @@ -352,7 +351,6 @@ impl ColorText { /// assert_eq!(ColorText::Black.to_class(), "text-black"); /// assert_eq!(ColorText::Default.to_class(), ""); /// ``` - #[inline] pub fn to_class(self) -> String { if let Some(suffix) = self.suffix() { let base_len = match self { diff --git a/extensions/pagetop-bootsier/src/theme/aux/layout.rs b/extensions/pagetop-bootsier/src/theme/aux/layout.rs index 09edbf91..a1255dc0 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/layout.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/layout.rs @@ -67,8 +67,8 @@ impl ScaleSize { /// assert_eq!(ScaleSize::Three.class_with("p"), "p-3"); /// assert_eq!(ScaleSize::None.class_with("border"), ""); /// ``` - #[inline] - pub(crate) fn class_with(self, prefix: &str) -> String { + #[doc(hidden)] + pub fn class_with(self, prefix: &str) -> String { if !prefix.is_empty() { if let Some(suffix) = self.suffix() { let mut class = String::with_capacity(prefix.len() + suffix.len()); diff --git a/extensions/pagetop-bootsier/src/theme/aux/rounded.rs b/extensions/pagetop-bootsier/src/theme/aux/rounded.rs index adf6c261..69976142 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/rounded.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/rounded.rs @@ -78,8 +78,8 @@ impl RoundedRadius { /// assert_eq!(RoundedRadius::Circle.class_with(""), "rounded-circle"); /// assert_eq!(RoundedRadius::None.class_with("rounded-bottom-start"), ""); /// ``` - #[inline] - pub(crate) fn class_with(self, prefix: &str) -> String { + #[doc(hidden)] + pub fn class_with(self, prefix: &str) -> String { if let Some(suffix) = self.suffix() { let base_len = if prefix.is_empty() { Self::ROUNDED.len() diff --git a/extensions/pagetop-bootsier/src/theme/classes/border.rs b/extensions/pagetop-bootsier/src/theme/classes/border.rs index 3095498c..2da7bfbb 100644 --- a/extensions/pagetop-bootsier/src/theme/classes/border.rs +++ b/extensions/pagetop-bootsier/src/theme/classes/border.rs @@ -145,7 +145,6 @@ impl Border { /// `"border border-top-0 border-end-3 border-primary border-opacity-50"`, etc.). /// /// Si no se define ningún tamaño, color ni opacidad, devuelve `""`. - #[inline] pub fn to_class(self) -> String { let mut classes = String::new(); self.push_class(&mut classes); diff --git a/extensions/pagetop-bootsier/src/theme/classes/color.rs b/extensions/pagetop-bootsier/src/theme/classes/color.rs index 162b7849..4f5b4650 100644 --- a/extensions/pagetop-bootsier/src/theme/classes/color.rs +++ b/extensions/pagetop-bootsier/src/theme/classes/color.rs @@ -76,7 +76,6 @@ impl Background { /// Devuelve las clases de fondo como cadena (`"bg-primary"`, `"bg-body-secondary bg-opacity-50"`, etc.). /// /// Si no se define ni color ni opacidad, devuelve `""`. - #[inline] pub fn to_class(self) -> String { let mut classes = String::new(); self.push_class(&mut classes); @@ -189,7 +188,6 @@ impl Text { /// etc.). /// /// Si no se define ni color ni opacidad, devuelve `""`. - #[inline] pub fn to_class(self) -> String { let mut classes = String::new(); self.push_class(&mut classes); diff --git a/extensions/pagetop-bootsier/src/theme/classes/layout.rs b/extensions/pagetop-bootsier/src/theme/classes/layout.rs index adb8c3e4..1f388450 100644 --- a/extensions/pagetop-bootsier/src/theme/classes/layout.rs +++ b/extensions/pagetop-bootsier/src/theme/classes/layout.rs @@ -94,7 +94,6 @@ impl Margin { /// Devuelve la clase de **margin** como cadena (`"mt-3"`, `"ms-lg-auto"`, etc.). /// /// Si `size` es `ScaleSize::None`, devuelve `""`. - #[inline] pub fn to_class(self) -> String { let Some(size) = self.size_suffix() else { return String::new(); @@ -195,7 +194,6 @@ impl Padding { /// Devuelve la clase de **padding** como cadena (`"px-2"`, `"pe-sm-4"`, etc.). /// /// Si `size` es `ScaleSize::None` o `ScaleSize::Auto`, devuelve `""`. - #[inline] pub fn to_class(self) -> String { let Some(size) = self.suffix() else { return String::new(); diff --git a/extensions/pagetop-bootsier/src/theme/classes/rounded.rs b/extensions/pagetop-bootsier/src/theme/classes/rounded.rs index 58d50b86..077740e1 100644 --- a/extensions/pagetop-bootsier/src/theme/classes/rounded.rs +++ b/extensions/pagetop-bootsier/src/theme/classes/rounded.rs @@ -160,7 +160,6 @@ impl Rounded { /// `"rounded-top rounded-bottom-start-4 rounded-bottom-end-circle"`, etc.). /// /// Si no se define ningún radio, devuelve `""`. - #[inline] pub fn to_class(self) -> String { let mut classes = String::new(); self.push_class(&mut classes); diff --git a/extensions/pagetop-bootsier/src/theme/container/props.rs b/extensions/pagetop-bootsier/src/theme/container/props.rs index 2010ba8e..209773b9 100644 --- a/extensions/pagetop-bootsier/src/theme/container/props.rs +++ b/extensions/pagetop-bootsier/src/theme/container/props.rs @@ -59,7 +59,6 @@ impl Width { } */ /// Devuelve la clase asociada al comportamiento del contenedor según el ajuste de su ancho. - #[inline] pub fn to_class(self) -> String { match self { Self::Default => BreakPoint::None.class_with(Self::CONTAINER, ""), diff --git a/extensions/pagetop-bootsier/src/theme/dropdown/props.rs b/extensions/pagetop-bootsier/src/theme/dropdown/props.rs index d88f0929..fd315508 100644 --- a/extensions/pagetop-bootsier/src/theme/dropdown/props.rs +++ b/extensions/pagetop-bootsier/src/theme/dropdown/props.rs @@ -95,8 +95,8 @@ impl Direction { /// Devuelve la clase asociada a la dirección teniendo en cuenta si se agrupa con otros menús /// [`Dropdown`], o `""` si no corresponde ninguna. - #[inline] - pub(crate) fn class_with(self, grouped: bool) -> String { + #[doc(hidden)] + pub fn class_with(self, grouped: bool) -> String { let mut classes = String::new(); self.push_class(&mut classes, grouped); classes @@ -179,8 +179,7 @@ impl MenuAlign { } /* Devuelve las clases de alineación sin incluir `dropdown-menu` (reservado). - #[inline] - pub(crate) fn to_class(self) -> String { + pub fn to_class(self) -> String { let mut classes = String::new(); self.push_class(&mut classes); classes diff --git a/extensions/pagetop-bootsier/src/theme/image/props.rs b/extensions/pagetop-bootsier/src/theme/image/props.rs index f31d74c1..2041b2fd 100644 --- a/extensions/pagetop-bootsier/src/theme/image/props.rs +++ b/extensions/pagetop-bootsier/src/theme/image/props.rs @@ -94,8 +94,7 @@ impl Source { } */ /// Devuelve la clase asociada a la imagen según la fuente. - #[inline] - pub(crate) fn to_class(&self) -> String { + pub fn to_class(&self) -> String { let s = self.as_str(); if s.is_empty() { String::new()