From 0696258bed42591654d916b28490c96e5d1ba6dd Mon Sep 17 00:00:00 2001 From: Haled Odat <8566042+HalidOdat@users.noreply.github.com> Date: Sat, 2 Mar 2024 17:32:30 +0100 Subject: [PATCH] Add `#[inline]` to public functions --- src/buffer/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buffer/mod.rs b/src/buffer/mod.rs index 5c724f3..1c3f593 100644 --- a/src/buffer/mod.rs +++ b/src/buffer/mod.rs @@ -50,7 +50,7 @@ impl Buffer { /// checks for special cases. /// /// [spec]: https://tc39.es/ecma262/#sec-numeric-types-number-tostring - #[cfg_attr(feature = "no-panic", inline)] + #[inline] #[cfg_attr(feature = "no-panic", no_panic)] pub fn format(&mut self, f: F) -> &str { if f.is_nonfinite() { @@ -98,7 +98,7 @@ impl Buffer { /// "Infinity", and negative infinity as "-Infinity" to match the [ECMAScript specification][spec]. /// /// [spec]: https://tc39.es/ecma262/#sec-numeric-types-number-tofixed - #[cfg_attr(feature = "no-panic", inline)] + #[inline] #[cfg_attr(feature = "no-panic", no_panic)] pub fn format_to_fixed(&mut self, f: F, fraction_digits: u8) -> &str { let fraction_digits = fraction_digits.min(100);