From 62e3cac7747f6660d2b43ed5c21be8ab584dff5d Mon Sep 17 00:00:00 2001 From: edef Date: Sun, 10 Apr 2022 23:29:51 +0000 Subject: ripple/fossil: split out FileRef/DirectoryRef Change-Id: I649c89ccc4e7fbc3ce42c86f6653d59c07cf58a9 --- ripple/fossil/src/bin/extract.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ripple/fossil/src/bin') diff --git a/ripple/fossil/src/bin/extract.rs b/ripple/fossil/src/bin/extract.rs index 685805d..e55c857 100644 --- a/ripple/fossil/src/bin/extract.rs +++ b/ripple/fossil/src/bin/extract.rs @@ -32,13 +32,13 @@ fn extract(store: &fossil::Store, path: &Path, dir: &Directory) { for (name, node) in &dir.children { let path = path.join(name); match node.clone() { - fossil::Node::Directory { r#ref, size: _ } => { - let blob = store.read_blob(r#ref); + fossil::Node::Directory(fossil::DirectoryRef { ident, size: _ }) => { + let blob = store.read_blob(ident); let pb = store::Directory::decode(&*blob).unwrap(); fs::create_dir(&path).unwrap(); extract(store, &path, &Directory::from_pb(pb)); } - fossil::Node::File { r#ref, executable } => { + fossil::Node::File(fossil::FileRef { ident, executable }) => { let mode = if executable { 0o755 } else { 0o644 }; let mut f = fs::OpenOptions::new() .write(true) @@ -46,7 +46,7 @@ fn extract(store: &fossil::Store, path: &Path, dir: &Directory) { .mode(mode) .open(path) .unwrap(); - let blob = store.read_blob(r#ref); + let blob = store.read_blob(ident); f.write_all(&blob).unwrap(); } fossil::Node::Link { target } => { -- cgit 1.4.1