code: func (d *Diff) Prune() {
  	if d == nil {
  		return
  	}
  
  	// Prune all empty modules
  	newModules := make([]*ModuleDiff, 0, len(d.Modules))
  	for _, m := range d.Modules {
  		// If the module isn't empty, we keep it
  		if !m.Empty() {
  			newModules = append(newModules, m)
  		}
  	}
  	if len(newModules) == 0 {
  		newModules = nil
  	}
  	d.Modules = newModules
  }
docs: // Prune cleans out unused structures in the diff without affecting
  // the behavior of the diff at all.
  //
  // This is not safe to call concurrently. This is safe to call on a
  // nil Diff.