Skip to content

Commit 2faa2ce

Browse files
committed
inline path::Components::parse_next_component_back()
Profiling showed that parse_next_component() does get inlined, inline the backwards variant to match its perf characteristics
1 parent 926f069 commit 2faa2ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/std/src/path.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,7 @@ impl<'a> Components<'a> {
739739

740740
// parse a component from the right, saying how many bytes to consume to
741741
// remove the component
742+
#[inline]
742743
fn parse_next_component_back(&self) -> (usize, Option<Component<'a>>) {
743744
debug_assert!(self.back == State::Body);
744745
let start = self.len_before_body();

0 commit comments

Comments
 (0)