Created
July 14, 2023 14:13
-
-
Save lann/4d9a3e3e4777b7f61e7bd7e4749d9ce5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Gets the missing content of the record. | |
pub fn missing_content(&self) -> impl Iterator<Item = (&AnyHash, &MissingContent)> { | |
match &self.state { | |
PackageRecordState::Sourcing { | |
missing_content, .. | |
} => Box::new(missing_content.iter()) as Box<dyn Iterator<Item = _>>, | |
_ => Box::new(std::iter::empty()) as Box<dyn Iterator<Item = _>>, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment