refactor: rename PackageFs::CAS to Cas

The name now fits in with the rest of the codebase.
This commit is contained in:
daimond113 2025-02-01 01:02:48 +01:00
parent 2154fc0e84
commit ca550eee3a
No known key found for this signature in database
GPG key ID: 640DC95EC1190354
5 changed files with 7 additions and 7 deletions

View file

@ -294,7 +294,7 @@ impl PruneCommand {
let mut removed_packages = 0usize;
'entry: for (path, fs) in cas_entries {
let PackageFs::CAS(entries) = fs else {
let PackageFs::Cas(entries) = fs else {
continue;
};

View file

@ -36,7 +36,7 @@ pub enum FsEntry {
#[serde(untagged)]
pub enum PackageFs {
/// A package stored in the CAS
CAS(BTreeMap<RelativePathBuf, FsEntry>),
Cas(BTreeMap<RelativePathBuf, FsEntry>),
/// A package that's to be copied
Copy(PathBuf, TargetKind),
}
@ -240,7 +240,7 @@ impl PackageFs {
link: bool,
) -> std::io::Result<()> {
match self {
PackageFs::CAS(entries) => {
PackageFs::Cas(entries) => {
package_fs_cas(
entries.clone(),
destination.as_ref(),
@ -262,7 +262,7 @@ impl PackageFs {
file_hash: H,
cas_dir_path: P,
) -> Option<String> {
if !matches!(self, PackageFs::CAS(_)) {
if !matches!(self, PackageFs::Cas(_)) {
return None;
}

View file

@ -481,7 +481,7 @@ impl PackageSource for GitPackageSource {
entries.insert(path, entry);
}
let fs = PackageFs::CAS(entries);
let fs = PackageFs::Cas(entries);
if let Some(parent) = index_file.parent() {
fs::create_dir_all(parent).await?;

View file

@ -276,7 +276,7 @@ impl PackageSource for PesdePackageSource {
entries.insert(path, FsEntry::File(hash));
}
let fs = PackageFs::CAS(entries);
let fs = PackageFs::Cas(entries);
if let Some(parent) = index_file.parent() {
fs::create_dir_all(parent)

View file

@ -312,7 +312,7 @@ impl PackageSource for WallyPackageSource {
entries.insert(relative_path, FsEntry::File(hash));
}
let fs = PackageFs::CAS(entries);
let fs = PackageFs::Cas(entries);
if let Some(parent) = index_file.parent() {
fs::create_dir_all(parent)