message: using flat-map trick
diff: @@ -76,13 +76,12 @@ pub enum QueryOrigin {
  impl QueryOrigin {
  /// Indices for queries *written* by this query (or `vec![]` if its value was assigned).
  - pub(crate) fn outputs(&self) -> Box<dyn Iterator<Item = DependencyIndex> + '_> {
  - match self {
  - QueryOrigin::Derived(edges) | QueryOrigin::DerivedUntracked(edges) => {
  - Box::new(edges.outputs())
  - }
  - QueryOrigin::Assigned(_) | QueryOrigin::BaseInput => Box::new(vec![].into_iter()),
  - }
  + pub(crate) fn outputs(&self) -> impl Iterator<Item = DependencyIndex> + '_ {
  + let opt_edges = match self {
  + QueryOrigin::Derived(edges) | QueryOrigin::DerivedUntracked(edges) => Some(edges),
  + QueryOrigin::Assigned(_) | QueryOrigin::BaseInput => None,
  + };
  + opt_edges.into_iter().flat_map(|edges| edges.outputs())
  }
  }
  