Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit 9e56abd

Browse files
author
bitfl0wer
committed
feat: impl From<LocalActor> for Actor
1 parent d6d642d commit 9e56abd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/database/models/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ pub struct Actor {
2222
r#type: ActorType,
2323
}
2424

25+
impl From<LocalActor> for Actor {
26+
fn from(value: LocalActor) -> Self {
27+
Self { unique_actor_identifier: value.unique_actor_identifier, r#type: ActorType::Local }
28+
}
29+
}
30+
2531
#[derive(sqlx::Decode, sqlx::Encode, sqlx::FromRow)]
2632
/// Actors from this home server.
2733
pub struct LocalActor {

0 commit comments

Comments
 (0)