Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Display where it makes sense #175

Open
skeet70 opened this issue Aug 6, 2020 · 0 comments
Open

Add Display where it makes sense #175

skeet70 opened this issue Aug 6, 2020 · 0 comments

Comments

@skeet70
Copy link
Member

skeet70 commented Aug 6, 2020

Places where we only have one basic implementation of Display, we should implement it. I was working with metadata results, and wanted to display the users a file was visible to. I expected to be able to:

metadata
  .visible_to_users()
  .join("\n")

but because Display wasn't implemented on something that is in reality VisibleUser(UserId(String)), I had to write:

metadata
  .visible_to_users()
  .iter()
  .map(|u| u.id().id())
  .collect::<Vec<_>>()
  .join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant