-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement layer export and import more generically #64
Conversation
Codecov Report
@@ Coverage Diff @@
## master #64 +/- ##
==========================================
- Coverage 72.36% 72.23% -0.14%
==========================================
Files 31 32 +1
Lines 11999 12072 +73
Branches 2127 2154 +27
==========================================
+ Hits 8683 8720 +37
- Misses 1079 1084 +5
- Partials 2237 2268 +31
Continue to review full report at Codecov.
|
@rrooij are you available for a review? |
I like this. However, I get the following error when compiling.
|
src/storage/pack.rs
Outdated
let parent_id = string_to_name(parent_id_str)?; | ||
|
||
result_map.insert(id, Some(parent_id)); | ||
} else if !result_map.contains_key(&id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://rust-lang.github.io/rust-clippy/master/index.html#map_entry
contains_key followed by insert is inefficient
src/storage/pack.rs
Outdated
|
||
result_map.insert(id, Some(parent_id)); | ||
} else if !result_map.contains_key(&id) { | ||
println!("hello b"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for debugging?
src/storage/pack.rs
Outdated
|
||
println!("about to go into loop"); | ||
for e in archive.entries()? { | ||
println!("a"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
printlns should probably be removed?
This implements layer export and import for the PersistentLayerStore, which currently backs both the memory and the directory layer store (yes it is a bit of a misnomer).
This closes #58. It is also an initial step towards #62, implementing the pack functionality as a separate trait in its own file instead of as part of a bigger trait. It also makes use of the
async_trait
macro as mentioned in #56.