Skip to content

Commit 238c784

Browse files
committed
chore: remove useless get_run_environment_name method
1 parent 8004646 commit 238c784

6 files changed

Lines changed: 2 additions & 28 deletions

File tree

src/run/run_environment/buildkite/provider.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ impl RunEnvironmentProvider for BuildkiteProvider {
124124
Box::new(BuildkiteLogger::new())
125125
}
126126

127-
fn get_run_environment_name(&self) -> &'static str {
128-
"Buildkite"
129-
}
130-
131127
fn get_run_environment(&self) -> RunEnvironment {
132128
RunEnvironment::Buildkite
133129
}

src/run/run_environment/github_actions/provider.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,6 @@ impl RunEnvironmentProvider for GitHubActionsProvider {
125125
Box::new(GithubActionLogger)
126126
}
127127

128-
fn get_run_environment_name(&self) -> &'static str {
129-
"GitHub Actions"
130-
}
131-
132128
fn get_run_environment(&self) -> RunEnvironment {
133129
RunEnvironment::GithubActions
134130
}

src/run/run_environment/gitlab_ci/provider.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ impl RunEnvironmentProvider for GitLabCIProvider {
144144
RepositoryProvider::GitLab
145145
}
146146

147-
fn get_run_environment_name(&self) -> &'static str {
148-
"GitLab CI"
149-
}
150-
151147
fn get_run_environment(&self) -> RunEnvironment {
152148
RunEnvironment::GitlabCi
153149
}

src/run/run_environment/local/provider.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,6 @@ impl RunEnvironmentProvider for LocalProvider {
114114
get_local_logger()
115115
}
116116

117-
fn get_run_environment_name(&self) -> &'static str {
118-
"Local"
119-
}
120-
121117
fn get_run_environment(&self) -> RunEnvironment {
122118
RunEnvironment::Local
123119
}

src/run/run_environment/provider.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@ pub trait RunEnvironmentProvider {
3838
/// Returns the repository provider for this RunEnvironment
3939
fn get_repository_provider(&self) -> RepositoryProvider;
4040

41-
/// Returns the name of the CI provider.
42-
///
43-
/// # Example
44-
///
45-
/// ```
46-
/// let provider = MyCIProvider::new();
47-
/// assert_eq!(provider.get_run_environment_name(), "MyCIProvider");
48-
/// ```
49-
fn get_run_environment_name(&self) -> &'static str;
50-
5141
/// Returns the run environment of the current provider.
5242
fn get_run_environment(&self) -> RunEnvironment;
5343

src/run/uploader/upload.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ pub async fn upload(
120120
let (archive_buffer, archive_hash) = get_profile_archive_buffer(run_data).await?;
121121

122122
debug!(
123-
"Run Environment provider detected: {:#?}",
124-
provider.get_run_environment_name()
123+
"Run Environment provider detected: {:?}",
124+
provider.get_run_environment()
125125
);
126126

127127
let upload_metadata =

0 commit comments

Comments
 (0)