Comparison functions are no longer provided
This commit is contained in:
parent
92b3089e5e
commit
e563cb3b2f
2 changed files with 0 additions and 12 deletions
|
@ -1,10 +0,0 @@
|
||||||
//! Utilities to compare custom types
|
|
||||||
//!
|
|
||||||
//! These can be used to sort results, e.g. by using `sorted_by` from the `itertools` crate
|
|
||||||
|
|
||||||
use crate::item::{Item, ItemId};
|
|
||||||
|
|
||||||
/// Compare alphabetically types returned e.g. by [`crate::traits::CompleteCalendar::get_items`]
|
|
||||||
pub fn compare_items_alpha(left: &(&ItemId, &&Item), right: &(&ItemId, &&Item)) -> std::cmp::Ordering {
|
|
||||||
Ord::cmp(&left.1.name().to_lowercase(), &right.1.name().to_lowercase())
|
|
||||||
}
|
|
|
@ -13,8 +13,6 @@ use crate::calendar::CalendarId;
|
||||||
use crate::Item;
|
use crate::Item;
|
||||||
use crate::item::SyncStatus;
|
use crate::item::SyncStatus;
|
||||||
|
|
||||||
pub mod comparison;
|
|
||||||
|
|
||||||
/// Walks an XML tree and returns every element that has the given name
|
/// Walks an XML tree and returns every element that has the given name
|
||||||
pub fn find_elems<S: AsRef<str>>(root: &Element, searched_name: S) -> Vec<&Element> {
|
pub fn find_elems<S: AsRef<str>>(root: &Element, searched_name: S) -> Vec<&Element> {
|
||||||
let searched_name = searched_name.as_ref();
|
let searched_name = searched_name.as_ref();
|
||||||
|
|
Loading…
Add table
Reference in a new issue