Skip to content

Commit 20e1c0e

Browse files
committed
Run
1 parent 8a8d6fd commit 20e1c0e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/core/src/net/parser.rs

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

8080
#[must_use]
8181
/// Read the next character from the input if it matches the target.
82+
#[inline]
8283
fn read_given_char(&mut self, target: char) -> Option<()> {
8384
self.read_atomically(|p| {
8485
p.read_char().and_then(|c| if c == target { Some(()) } else { None })
@@ -89,6 +90,7 @@ impl<'a> Parser<'a> {
8990
/// character iff index > 0, then runs the parser. When used in a loop,
9091
/// the separator character will only be read on index > 0 (see
9192
/// read_ipv4_addr for an example)
93+
#[inline]
9294
fn read_separator<T, F>(&mut self, sep: char, index: usize, inner: F) -> Option<T>
9395
where
9496
F: FnOnce(&mut Parser<'_>) -> Option<T>,
@@ -228,6 +230,7 @@ impl<'a> Parser<'a> {
228230
}
229231

230232
/// Read a `:` followed by a port in base 10.
233+
#[inline]
231234
fn read_port(&mut self) -> Option<u16> {
232235
self.read_atomically(|p| {
233236
p.read_given_char(':')?;
@@ -236,6 +239,7 @@ impl<'a> Parser<'a> {
236239
}
237240

238241
/// Read a `%` followed by a scope ID in base 10.
242+
#[inline]
239243
fn read_scope_id(&mut self) -> Option<u32> {
240244
self.read_atomically(|p| {
241245
p.read_given_char('%')?;

0 commit comments

Comments
 (0)