func (c *connection) lastHelpful() time.Time { lasts := []time.Time{c.lastUsefulChunkReceived} if c.t.seeding() { lasts = append(lasts, c.lastChunkSent) } return missinggo.Max(time.Time.Before, slices.ToEmptyInterface(lasts)...).(time.Time) }
func StringIterator(a string) Iterator { return SliceIterator(slices.ToEmptyInterface(a)) }