diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-04 10:43:01 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-07 13:21:54 +0100 |
commit | a11a57e6364c701a443795b3a29269ea1241c7e0 (patch) | |
tree | 1ed539e7abf4ae21063a3a6ef56aec728ad60daf /src/filestore | |
parent | aff153795b58fe1bccc94e2f3297265c1d670f82 (diff) |
Remove Artifact::create{,_path}() (unused)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/filestore')
-rw-r--r-- | src/filestore/artifact.rs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/filestore/artifact.rs b/src/filestore/artifact.rs index 9e02de6..e411b06 100644 --- a/src/filestore/artifact.rs +++ b/src/filestore/artifact.rs @@ -76,28 +76,6 @@ impl Artifact { .map(|((name, _), vers)| (name, vers)) } - pub fn create(root: &Path, name: PackageName, version: PackageVersion) -> Result<Self> { - let path = Self::create_path(root, &name, &version)?; - if !path.exists() { - Ok(Artifact { - path, - name, - version - }) - } else { - Err(anyhow!("Path exists: {}", path.display())) - } - } - - fn create_path(root: &Path, name: &PackageName, version: &PackageVersion) -> Result<PathBuf> { - if !root.is_dir() { - return Err(anyhow!("Cannot create file path for {}-{} when root is file path: {}", - name, version, root.display())) - } - - Ok(root.join(format!("{}-{}", name, version))) - } - } #[cfg(test)] |