refactor: simplify payload assignment in Event struct

This commit is contained in:
Kiril Videlov 2023-11-16 15:42:22 +01:00 committed by Kiril Videlov
parent b23169fc92
commit d12d647ba9

View File

@ -134,9 +134,7 @@ impl Event {
) -> Self {
Event {
name: format!("project://{}/virtual-branches", project_id),
payload: serde_json::json!({
"virtualBranches": virtual_branches,
}),
payload: serde_json::json!(virtual_branches),
project_id: *project_id,
}
}