MCPcopy Create free account
hub / github.com/Freaky/Compactor / pop

Method pop

src/folder.rs:95–110  ·  view source on GitHub ↗
(&mut self, kind: FileKind)

Source from the content-addressed store, hash-verified

93 }
94
95 pub fn pop(&mut self, kind: FileKind) -> Option<FileInfo> {
96 let ret = match kind {
97 FileKind::Compressible => self.compressible.pop(),
98 FileKind::Compressed => self.compressed.pop(),
99 FileKind::Skipped => self.skipped.pop(),
100 };
101
102 if let Some(fi) = ret {
103 self.logical_size -= fi.logical_size;
104 self.physical_size -= fi.physical_size;
105
106 Some(fi)
107 } else {
108 None
109 }
110 }
111
112 pub fn push(&mut self, kind: FileKind, fi: FileInfo) {
113 self.logical_size += fi.logical_size;

Callers 4

compress_loopMethod · 0.80
uncompress_loopMethod · 0.80
app.jsFile · 0.80
saveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected