From d64024e1abb439283ae0f244efba506fccb54946 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 10 Apr 2024 10:54:41 +0100 Subject: [PATCH] feat(server): implement Display for forge::Commit --- src/server/forge/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/server/forge/mod.rs b/src/server/forge/mod.rs index 8d35f4c2..55a9da2f 100644 --- a/src/server/forge/mod.rs +++ b/src/server/forge/mod.rs @@ -1,3 +1,5 @@ +use std::fmt::{Display, Formatter}; + pub mod forgejo; #[derive(Clone, Debug)] @@ -11,3 +13,8 @@ pub struct CommitHistories { pub struct Commit { pub sha: String, } +impl Display for Commit { + fn fmt(&self, f: &mut Formatter) -> std::fmt::Result { + write!(f, "{}", self.sha) + } +}