Skip to content

Commit

Permalink
Add #[inline] to public functions (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat authored Mar 2, 2024
1 parent 8466a5a commit e0c3f69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<F: Float>(&mut self, f: F) -> &str {
if f.is_nonfinite() {
Expand Down Expand Up @@ -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<F: FloatToFixed>(&mut self, f: F, fraction_digits: u8) -> &str {
let fraction_digits = fraction_digits.min(100);
Expand Down

0 comments on commit e0c3f69

Please sign in to comment.