room: confirm spec accuracy

master
Devin R 2020-04-16 22:07:12 -04:00
parent ebe4f03c36
commit 31fb702140
1 changed files with 1 additions and 0 deletions

View File

@ -146,6 +146,7 @@ impl RoomName {
} else if heroes < (joined + invited - one) && invited + joined > one { } else if heroes < (joined + invited - one) && invited + joined > one {
let mut names = self.heroes.iter().take(3).cloned().collect::<Vec<String>>(); let mut names = self.heroes.iter().take(3).cloned().collect::<Vec<String>>();
names.sort(); names.sort();
// TODO what is the length the spec wants us to use here and in the `else`
format!("{}, and {} others", names.join(", "), (joined + invited)) format!("{}, and {} others", names.join(", "), (joined + invited))
} else { } else {
format!("Empty Room (was {} others)", members.len()) format!("Empty Room (was {} others)", members.len())