Skip to content

Commit f104e43

Browse files
Add inline to get_start and get_end
Signed-off-by: Dusan Malusev <[email protected]>
1 parent c706e65 commit f104e43

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hosts-edit/src/commands/remove.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ impl<'a> Visitor<'a> {
4949
}
5050
}
5151

52+
#[inline(always)]
5253
pub /*const*/ fn get_start(&self) -> Option<usize> {
5354
if self.hosts_on_line > 1 {
5455
self.host_to_remove_pos.or(Some(self.start))
@@ -57,6 +58,7 @@ impl<'a> Visitor<'a> {
5758
}
5859
}
5960

61+
#[inline(always)]
6062
pub /*const*/ fn get_end(&self) -> Option<usize> {
6163
if self.hosts_on_line > 1 {
6264
self.host_to_remove_pos.or(Some(self.end))
@@ -65,6 +67,7 @@ impl<'a> Visitor<'a> {
6567
}
6668
}
6769

70+
#[inline(always)]
6871
pub fn has_found(&self) -> bool {
6972
self.host_to_remove_pos.is_some()
7073
}

0 commit comments

Comments
 (0)