Skip to content

Commit

Permalink
Annotate List From impls with #[inline]
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Aug 30, 2023
1 parent 0576afc commit d442559
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/list/removable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ impl RemovableList {
}

impl From<Vec<String>> for RemovableList {
#[inline]
fn from(item: Vec<String>) -> Self {
let mut res = RemovableList {
items: vec![],
Expand All @@ -58,6 +59,7 @@ impl From<Vec<String>> for RemovableList {
}

impl From<RemovableList> for Vec<String> {
#[inline]
fn from(l: RemovableList) -> Self {
drop(l.negations);
l.items
Expand Down
2 changes: 2 additions & 0 deletions src/list/unique.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ impl UniqueList {
}

impl From<Vec<String>> for UniqueList {
#[inline]
fn from(item: Vec<String>) -> Self {
let mut res = Self { items: vec![] };
for it in item {
Expand All @@ -36,6 +37,7 @@ impl From<Vec<String>> for UniqueList {
}

impl From<UniqueList> for Vec<String> {
#[inline]
fn from(l: UniqueList) -> Self {
l.items
}
Expand Down

0 comments on commit d442559

Please sign in to comment.