Skip to content

Commit

Permalink
style: Run cargo fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
shanecelis committed Apr 30, 2024
1 parent 9ff685a commit 4a334a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/inc_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,11 @@ impl<'a, Label: Ord, Value> IncSearch<'a, Label, Value> {
C: TryFromIterator<Label, M>,
Label: Clone,
{
let mut v: Vec<Label> = self.trie.child_to_ancestors(self.node)
.map(|node| self.trie.label(node).clone()).collect();
let mut v: Vec<Label> = self
.trie
.child_to_ancestors(self.node)
.map(|node| self.trie.label(node).clone())
.collect();
v.reverse();
v.into_iter().try_collect().expect("Could not collect")
}
Expand Down
4 changes: 2 additions & 2 deletions src/map/trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use super::Trie;
use crate::inc_search::IncSearch;
use crate::iter::{PostfixIter, PrefixIter, SearchIter};
use crate::try_collect::{TryCollect, TryFromIterator};
use louds_rs::{ChildNodeIter, LoudsNodeNum, AncestorNodeIter};
use louds_rs::{AncestorNodeIter, ChildNodeIter, LoudsNodeNum};
use std::iter::FromIterator;

impl<Label: Ord, Value> Trie<Label, Value> {
Expand Down Expand Up @@ -232,7 +232,7 @@ impl<Label: Ord, Value> Trie<Label, Value> {
self.trie_labels[(node_num.0 - 2) as usize].value.as_mut()
}

pub (crate) fn child_to_ancestors(&self, node_num: LoudsNodeNum) -> AncestorNodeIter {
pub(crate) fn child_to_ancestors(&self, node_num: LoudsNodeNum) -> AncestorNodeIter {
self.louds.child_to_ancestors(node_num)
}
}
Expand Down

0 comments on commit 4a334a1

Please sign in to comment.