forked from kemitix/git-next
refactor: rename name to forge_name for consistency
This commit is contained in:
parent
8b56a185d3
commit
fc1c79620c
2 changed files with 5 additions and 5 deletions
|
@ -262,7 +262,7 @@ impl secrecy::ExposeSecret<String> for ApiToken {
|
||||||
/// The derived information about a Forge, used to create interactions with it
|
/// The derived information about a Forge, used to create interactions with it
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct ForgeDetails {
|
pub struct ForgeDetails {
|
||||||
pub name: ForgeName,
|
pub forge_name: ForgeName,
|
||||||
pub forge_type: ForgeType,
|
pub forge_type: ForgeType,
|
||||||
pub hostname: Hostname,
|
pub hostname: Hostname,
|
||||||
pub user: User,
|
pub user: User,
|
||||||
|
@ -273,7 +273,7 @@ pub struct ForgeDetails {
|
||||||
impl From<(&ForgeName, &ForgeConfig)> for ForgeDetails {
|
impl From<(&ForgeName, &ForgeConfig)> for ForgeDetails {
|
||||||
fn from(forge: (&ForgeName, &ForgeConfig)) -> Self {
|
fn from(forge: (&ForgeName, &ForgeConfig)) -> Self {
|
||||||
Self {
|
Self {
|
||||||
name: forge.0.clone(),
|
forge_name: forge.0.clone(),
|
||||||
forge_type: forge.1.forge_type.clone(),
|
forge_type: forge.1.forge_type.clone(),
|
||||||
hostname: forge.1.hostname(),
|
hostname: forge.1.hostname(),
|
||||||
user: forge.1.user(),
|
user: forge.1.user(),
|
||||||
|
@ -343,7 +343,7 @@ impl RepoDetails {
|
||||||
branch: BranchName(server_repo_config.branch.clone()),
|
branch: BranchName(server_repo_config.branch.clone()),
|
||||||
gitdir: server_repo_config.gitdir(),
|
gitdir: server_repo_config.gitdir(),
|
||||||
forge: ForgeDetails {
|
forge: ForgeDetails {
|
||||||
name: forge_name.clone(),
|
forge_name: forge_name.clone(),
|
||||||
forge_type: forge.forge_type.clone(),
|
forge_type: forge.forge_type.clone(),
|
||||||
hostname: forge.hostname(),
|
hostname: forge.hostname(),
|
||||||
user: forge.user(),
|
user: forge.user(),
|
||||||
|
@ -368,7 +368,7 @@ impl Display for RepoDetails {
|
||||||
write!(
|
write!(
|
||||||
f,
|
f,
|
||||||
"{}/{} ({}): {}:{}/{} @ {}",
|
"{}/{} ({}): {}:{}/{} @ {}",
|
||||||
self.forge.name,
|
self.forge.forge_name,
|
||||||
self.repo_alias,
|
self.repo_alias,
|
||||||
self.forge.forge_type,
|
self.forge.forge_type,
|
||||||
self.forge.hostname,
|
self.forge.hostname,
|
||||||
|
|
|
@ -5,7 +5,7 @@ use crate::server::config::{
|
||||||
|
|
||||||
pub fn forge_details(n: u32, forge_type: ForgeType) -> ForgeDetails {
|
pub fn forge_details(n: u32, forge_type: ForgeType) -> ForgeDetails {
|
||||||
ForgeDetails {
|
ForgeDetails {
|
||||||
name: forge_name(n),
|
forge_name: forge_name(n),
|
||||||
forge_type,
|
forge_type,
|
||||||
hostname: hostname(n),
|
hostname: hostname(n),
|
||||||
user: user(n),
|
user: user(n),
|
||||||
|
|
Loading…
Reference in a new issue