mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 14:20:42 +08:00
cob: Create proper OpId type
To still access a comment's author, we add a new `author` field.
This commit is contained in:
committed by
Alexis Sellier
parent
a93803c8ca
commit
134bb7a847
@@ -423,9 +423,11 @@ impl<'a> FromIterator<(&'a CommentId, &'a thread::Comment)> for Comments {
|
||||
fn from_iter<I: IntoIterator<Item = (&'a CommentId, &'a thread::Comment)>>(iter: I) -> Self {
|
||||
let mut comments = Vec::new();
|
||||
|
||||
for (comment_id, comment) in iter {
|
||||
for (_, comment) in iter {
|
||||
comments.push(Comment {
|
||||
author: Author { id: comment_id.1 },
|
||||
author: Author {
|
||||
id: comment.author(),
|
||||
},
|
||||
body: comment.body().to_owned(),
|
||||
reactions: [],
|
||||
timestamp: comment.timestamp(),
|
||||
|
||||
Reference in New Issue
Block a user