From fc1c79620cfea7d34c531ebc4f3690240b05b3b5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 23 Apr 2024 06:53:34 +0100 Subject: [PATCH] refactor: rename name to forge_name for consistency --- src/server/config/mod.rs | 8 ++++---- src/server/gitforge/tests/common.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/config/mod.rs b/src/server/config/mod.rs index 74d85f5d..df8c584d 100644 --- a/src/server/config/mod.rs +++ b/src/server/config/mod.rs @@ -262,7 +262,7 @@ impl secrecy::ExposeSecret for ApiToken { /// The derived information about a Forge, used to create interactions with it #[derive(Clone, Debug)] pub struct ForgeDetails { - pub name: ForgeName, + pub forge_name: ForgeName, pub forge_type: ForgeType, pub hostname: Hostname, pub user: User, @@ -273,7 +273,7 @@ pub struct ForgeDetails { impl From<(&ForgeName, &ForgeConfig)> for ForgeDetails { fn from(forge: (&ForgeName, &ForgeConfig)) -> Self { Self { - name: forge.0.clone(), + forge_name: forge.0.clone(), forge_type: forge.1.forge_type.clone(), hostname: forge.1.hostname(), user: forge.1.user(), @@ -343,7 +343,7 @@ impl RepoDetails { branch: BranchName(server_repo_config.branch.clone()), gitdir: server_repo_config.gitdir(), forge: ForgeDetails { - name: forge_name.clone(), + forge_name: forge_name.clone(), forge_type: forge.forge_type.clone(), hostname: forge.hostname(), user: forge.user(), @@ -368,7 +368,7 @@ impl Display for RepoDetails { write!( f, "{}/{} ({}): {}:{}/{} @ {}", - self.forge.name, + self.forge.forge_name, self.repo_alias, self.forge.forge_type, self.forge.hostname, diff --git a/src/server/gitforge/tests/common.rs b/src/server/gitforge/tests/common.rs index 4d422db5..2373b2ef 100644 --- a/src/server/gitforge/tests/common.rs +++ b/src/server/gitforge/tests/common.rs @@ -5,7 +5,7 @@ use crate::server::config::{ pub fn forge_details(n: u32, forge_type: ForgeType) -> ForgeDetails { ForgeDetails { - name: forge_name(n), + forge_name: forge_name(n), forge_type, hostname: hostname(n), user: user(n),