Improve derbugg logging (#1738)

* Improve derbugg logging

Make it more readable

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix excessive logging

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-06-13 00:25:24 +10:00 committed by GitHub
parent a2d2c5d85c
commit 4687726c66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 54 additions and 15 deletions

View file

@ -1,4 +1,4 @@
use std::future::Future;
use std::{fmt, future::Future};
use compact_str::CompactString;
use serde::Deserialize;
@ -20,6 +20,16 @@ pub struct RepoInfo {
private: bool,
}
impl fmt::Display for RepoInfo {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"RepoInfo {{ owner: {}, name: {}, is_private: {} }}",
self.owner.login, self.name, self.private
)
}
}
impl RepoInfo {
#[cfg(test)]
pub(crate) fn new(GhRepo { owner, repo }: GhRepo, private: bool) -> Self {