Skip to content

Instantly share code, notes, and snippets.

Created February 19, 2018 20:37
Show Gist options
  • Save anonymous/e5c64e7a67e50560ea28ac26ff75fad9 to your computer and use it in GitHub Desktop.
Save anonymous/e5c64e7a67e50560ea28ac26ff75fad9 to your computer and use it in GitHub Desktop.
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>) ->
Iterator<Item=&'a LibraryFile> {
local.difference(dms)
}U
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment