-
Notifications
You must be signed in to change notification settings - Fork 0
Clear name for pack/pack_file/count_xxx #27
Copy link
Copy link
Open
Description
// XXX: combine with get_n_objs and return dicts
fn get_total_size(&self) -> PyResult<u64> {
let info = rsdos::cli::stat(&self.inner)?;
Ok(info.size.loose)
}
// FIXME: rename count_loose
fn get_n_objs(&self) -> PyResult<u64> {
let info = rsdos::cli::stat(&self.inner)?;
Ok(info.count.loose)
}
fn get_count_pack(&self) -> PyResult<u64> {
let info = rsdos::cli::stat(&self.inner)?;
Ok(info.count.packs)
}
fn get_count_pack_file(&self) -> PyResult<u64> {
let info = rsdos::cli::stat(&self.inner)?;
Ok(info.count.packs_file)
}prefix get_ is confuse and not necessary.
Ok(ContainerInfo {
location: cnt.path.display().to_string(),
id: config.container_id.to_string(),
compression_algorithm: config.compression_algorithm,
count: CountInfo {
// number of loose objs
loose: loose_files_count,
// number of pack objs
// FIXME: rename -> pack
packs: packs_count,
// number of pack files
packs_file: packs_file_count,
},
size: SizeInfo {
// total size of all loose objs
loose: loose_files_size,
// total size of all pack objs
packs: packs_size,
// total size of all pack files
packs_file: packs_file_size,
// size of pack index db file
packs_db: packs_db_size,
},
})prefer pack_file over packs_file?
prefer count.pack_obj over count.packs?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels