Skip to content

Commit 8a8d6fd

Browse files
committed
Run
1 parent 9b0d03f commit 8a8d6fd

File tree

7 files changed

+10
-0
lines changed

7 files changed

+10
-0
lines changed

library/core/src/ascii.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub struct EscapeDefault(escape::EscapeIterInner<4>);
9090
/// assert_eq!(b'd', escaped.next().unwrap());
9191
/// ```
9292
#[stable(feature = "rust1", since = "1.0.0")]
93+
#[inline]
9394
pub fn escape_default(c: u8) -> EscapeDefault {
9495
let mut data = [Char::Null; 4];
9596
let range = escape::escape_ascii_into(&mut data, c);

library/core/src/char/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ pub const fn from_digit(num: u32, radix: u32) -> Option<char> {
152152
pub struct EscapeUnicode(escape::EscapeIterInner<10>);
153153

154154
impl EscapeUnicode {
155+
#[inline]
155156
fn new(chr: char) -> Self {
156157
let mut data = [ascii::Char::Null; 10];
157158
let range = escape::escape_unicode_into(&mut data, chr);

library/core/src/ffi/c_str.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ impl CStr {
624624
/// ```
625625
#[stable(feature = "cstr_to_str", since = "1.4.0")]
626626
#[rustc_const_stable(feature = "const_cstr_methods", since = "1.72.0")]
627+
#[inline]
627628
pub const fn to_str(&self) -> Result<&str, str::Utf8Error> {
628629
// N.B., when `CStr` is changed to perform the length check in `.to_bytes()`
629630
// instead of in `from_ptr()`, it may be worth considering if this should

library/core/src/fmt/builders.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> {
340340
/// This method is equivalent to [`DebugTuple::field`], but formats the
341341
/// value using a provided closure rather than by calling [`Debug::fmt`].
342342
#[unstable(feature = "debug_closure_helpers", issue = "117729")]
343+
#[inline]
343344
pub fn field_with<F>(&mut self, value_fmt: F) -> &mut Self
344345
where
345346
F: FnOnce(&mut fmt::Formatter<'_>) -> fmt::Result,

library/core/src/net/parser.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ impl<'a> Parser<'a> {
137137
}
138138

139139
/// Read an IPv4 address.
140+
#[inline]
140141
fn read_ipv4_addr(&mut self) -> Option<Ipv4Addr> {
141142
self.read_atomically(|p| {
142143
let mut groups = [0; 4];
@@ -154,6 +155,7 @@ impl<'a> Parser<'a> {
154155
}
155156

156157
/// Read an IPv6 Address.
158+
#[inline]
157159
fn read_ipv6_addr(&mut self) -> Option<Ipv6Addr> {
158160
/// Read a chunk of an IPv6 address into `groups`. Returns the number
159161
/// of groups read, along with a bool indicating if an embedded
@@ -242,6 +244,7 @@ impl<'a> Parser<'a> {
242244
}
243245

244246
/// Read an IPv4 address with a port.
247+
#[inline]
245248
fn read_socket_addr_v4(&mut self) -> Option<SocketAddrV4> {
246249
self.read_atomically(|p| {
247250
let ip = p.read_ipv4_addr()?;
@@ -251,6 +254,7 @@ impl<'a> Parser<'a> {
251254
}
252255

253256
/// Read an IPv6 address with a port.
257+
#[inline]
254258
fn read_socket_addr_v6(&mut self) -> Option<SocketAddrV6> {
255259
self.read_atomically(|p| {
256260
p.read_given_char('[')?;

library/core/src/num/flt2dec/estimator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/// This is used to approximate `k = ceil(log_10 (mant * 2^exp))`;
66
/// the true `k` is either `k_0` or `k_0+1`.
77
#[doc(hidden)]
8+
#[inline]
89
pub fn estimate_scaling_factor(mant: u64, exp: i16) -> i16 {
910
// 2^(nbits-1) < mant <= 2^nbits if mant > 0
1011
let nbits = 64 - (mant - 1).leading_zeros() as i64;

library/core/src/str/count.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ fn sum_bytes_in_usize(values: usize) -> usize {
131131
// bytes in the string which are not continuation bytes", and is used for the
132132
// head and tail of the input string (the first and last item in the tuple
133133
// returned by `slice::align_to`).
134+
#[inline]
134135
fn char_count_general_case(s: &[u8]) -> usize {
135136
s.iter().filter(|&&byte| !super::validations::utf8_is_cont_byte(byte)).count()
136137
}

0 commit comments

Comments
 (0)