Skip to content

Instantly share code, notes, and snippets.

@maurer
maurer / playground.rs
Created February 19, 2018 20:37 — forked from anonymous/playground.rs
Rust code shared from the playground
/// Retrieve a list of new files to be copied to the DMS.
pub fn added_files<'a>(local: &'a BTreeSet<LibraryFile>, dms: &'a BTreeSet<LibraryFile>) ->
Vec<&'a LibraryFile> {
local.difference(dms).collect()
}
/// Retrieve a list of new files to be copied to the DMS.
pub fn added_files<'a>(local: &'a BTreeSet<LibraryFile>, dms: &'a BTreeSet<LibraryFile>) ->
Box<Iterator<Item=&'a LibraryFile>> {
Box::new(local.difference(dms)) as Box<Iterator<Item=&'a LibraryFile>>