Minor refactoring

This commit is contained in:
Patrick Lühne 2019-03-02 01:02:21 +01:00
parent e454558faa
commit e19e405781
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -366,12 +366,17 @@ impl BenchmarkRepository
Some(content.to_owned())
}
fn result_repository_path(&self, job_id: u32) -> PathBuf
{
self.base_path.join(format!("job-{}", job_id))
}
pub fn create_result_repository(&mut self) -> Job
{
let job_id = self.jobs;
self.jobs += 1;
let result_repository_path = self.base_path.join(format!("job-{}", job_id));
let result_repository_path = self.result_repository_path(job_id);
if result_repository_path.exists()
{
@ -416,8 +421,7 @@ impl BenchmarkRepository
(
|job_id|
{
let job_repository_path = self.base_path.join(format!("job-{}", job_id));
let job_repository_path = self.result_repository_path(*job_id);
let job_repository = match Repository::open(&job_repository_path)
{
Ok(value) => value,