···2626/// there is probably a nice way to implement PartialOrd, but... we're just
2727/// going to tack a `/` on the end and call it a day
2828#[derive(Debug, PartialEq, Eq)]
2929-pub struct SortableCollection(String);
2929+pub struct SortableCollection(Nsid<'static>);
30303131impl Ord for SortableCollection {
3232 fn cmp(&self, other: &Self) -> Ordering {
3333- let (s, o) = (&self.0, &other.0);
3333+ let (s, o) = (&self.0.as_str(), &other.0.as_str());
34343535 if s.len() < o.len()
3636 && let Some(o_suffix) = o.strip_prefix(s)
···5454 }
5555}
56565757-impl<'a> From<&Nsid<'a>> for SortableCollection {
5858- fn from(nsid: &Nsid<'a>) -> SortableCollection {
5757+impl<'a> From<&'a Nsid<'a>> for SortableCollection {
5858+ fn from(nsid: &'a Nsid<'a>) -> SortableCollection {
5959 let s = nsid.to_string();
6060- SortableCollection(s)
6060+ SortableCollection(s.into())
6161 }
6262}
6363···6666 ///
6767 /// panics if missing the '/' suffix or if the nsid got messed up
6868 fn from(SortableCollection(s): &SortableCollection) -> Nsid<'static> {
6969- Nsid::from(s.clone())
6969+ s.clone()
7070 }
7171}
7272