diff --git a/Cargo.lock b/Cargo.lock index c5c2129fb..677409496 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "aho-corasick" version = "0.7.13" @@ -142,12 +144,6 @@ version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.0.0" @@ -555,7 +551,7 @@ name = "jujube" version = "0.1.1" dependencies = [ "blake2", - "bytes 1.0.0", + "bytes", "chrono", "clap", "config", @@ -586,7 +582,7 @@ dependencies = [ "backoff", "blake2", "byteorder", - "bytes 1.0.0", + "bytes", "chrono", "config", "diff", @@ -899,27 +895,27 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.18.1" +version = "2.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da78e04bc0e40f36df43ecc6575e4f4b180e8156c4efd73f13d5619479b05696" +checksum = "73f72884896d22e0da0e5b266cb9a780b791f6c3b2f5beab6368d6cd4f0dbb86" dependencies = [ - "bytes 0.5.6", + "bytes", ] [[package]] name = "protobuf-codegen" -version = "2.18.1" +version = "2.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b2b929363268881afe6d24351e8b711ea5a1901a5e1549d3723ebcc5d3696d" +checksum = "e8217a1652dbc91d19c509c558234145faed729191a966896414e5889f62d543" dependencies = [ "protobuf", ] [[package]] name = "protobuf-codegen-pure" -version = "2.18.1" +version = "2.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a4b843fcc85f42b9f717a34481b9a323527f1b6ac62b20776514c044fc7da9" +checksum = "1f239d71417bdc5f8d83c07aeb265f911346e5540a1a6c4285f9c3d1966ed6e3" dependencies = [ "protobuf", "protobuf-codegen", diff --git a/Cargo.toml b/Cargo.toml index 8908344da..5adf3a17d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,8 +34,8 @@ indoc = "1.0.3" jujube-lib = { version = "=0.1.1", path = "lib"} pest = "2.1.3" pest_derive = "2.1.0" -protobuf = { version = "2.18.1", features = ["with-bytes"] } -protobuf-codegen-pure = "2.18.1" +protobuf = { version = "2.22.0", features = ["with-bytes"] } +protobuf-codegen-pure = "2.22.0" serde_json = "1.0.60" tempfile = "3.1.0" thiserror = "1.0.22" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 1fe85dd24..756952a12 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -13,7 +13,7 @@ readme = "../README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] -protobuf-codegen-pure = "2.18.1" +protobuf-codegen-pure = "2.22.0" [dependencies] backoff = "0.2.1" @@ -27,7 +27,7 @@ dirs = "3.0.1" git2 = "0.13.14" hex = "0.4.2" maplit = "1.0.2" -protobuf = { version = "2.18.1", features = ["with-bytes"] } +protobuf = { version = "2.22.0", features = ["with-bytes"] } rand = "0.8.0" serde_json = "1.0.60" tempfile = "3.1.0" diff --git a/lib/src/git_store.rs b/lib/src/git_store.rs index 02d4c53cb..19118ad7c 100644 --- a/lib/src/git_store.rs +++ b/lib/src/git_store.rs @@ -102,7 +102,7 @@ fn serialize_note(commit: &Commit) -> String { fn deserialize_note(commit: &mut Commit, note: &str) { let bytes = hex::decode(note).unwrap(); let mut cursor = Cursor::new(bytes); - let proto: crate::protos::store::Commit = protobuf::parse_from_reader(&mut cursor).unwrap(); + let proto: crate::protos::store::Commit = Message::parse_from_reader(&mut cursor).unwrap(); commit.is_open = proto.is_open; commit.is_pruned = proto.is_pruned; commit.change_id = ChangeId(proto.change_id); diff --git a/lib/src/local_store.rs b/lib/src/local_store.rs index 832d4d051..a0cd1a813 100644 --- a/lib/src/local_store.rs +++ b/lib/src/local_store.rs @@ -171,7 +171,7 @@ impl Store for LocalStore { let path = self.tree_path(&id); let mut file = File::open(path).map_err(not_found_to_store_error)?; - let proto: crate::protos::store::Tree = protobuf::parse_from_reader(&mut file)?; + let proto: crate::protos::store::Tree = Message::parse_from_reader(&mut file)?; Ok(tree_from_proto(&proto)) } @@ -194,7 +194,7 @@ impl Store for LocalStore { let path = self.commit_path(&id); let mut file = File::open(path).map_err(not_found_to_store_error)?; - let proto: crate::protos::store::Commit = protobuf::parse_from_reader(&mut file)?; + let proto: crate::protos::store::Commit = Message::parse_from_reader(&mut file)?; Ok(commit_from_proto(&proto)) } @@ -217,7 +217,7 @@ impl Store for LocalStore { let path = self.conflict_path(&id); let mut file = File::open(path).map_err(not_found_to_store_error)?; - let proto: crate::protos::store::Conflict = protobuf::parse_from_reader(&mut file)?; + let proto: crate::protos::store::Conflict = Message::parse_from_reader(&mut file)?; Ok(conflict_from_proto(&proto)) } diff --git a/lib/src/simple_op_store.rs b/lib/src/simple_op_store.rs index 693492151..d0ffb17af 100644 --- a/lib/src/simple_op_store.rs +++ b/lib/src/simple_op_store.rs @@ -83,7 +83,7 @@ impl OpStore for SimpleOpStore { let path = self.view_path(&id); let mut file = File::open(path).map_err(not_found_to_store_error)?; - let proto: crate::protos::op_store::View = protobuf::parse_from_reader(&mut file)?; + let proto: crate::protos::op_store::View = Message::parse_from_reader(&mut file)?; Ok(view_from_proto(&proto)) } @@ -106,7 +106,7 @@ impl OpStore for SimpleOpStore { let path = self.operation_path(&id); let mut file = File::open(path).map_err(not_found_to_store_error)?; - let proto: crate::protos::op_store::Operation = protobuf::parse_from_reader(&mut file)?; + let proto: crate::protos::op_store::Operation = Message::parse_from_reader(&mut file)?; Ok(operation_from_proto(&proto)) } diff --git a/lib/src/working_copy.rs b/lib/src/working_copy.rs index 970a917d2..a3aee0381 100644 --- a/lib/src/working_copy.rs +++ b/lib/src/working_copy.rs @@ -218,7 +218,7 @@ impl TreeState { fn read(&mut self, mut file: File) { self.update_read_time(); let proto: crate::protos::working_copy::TreeState = - protobuf::parse_from_reader(&mut file).unwrap(); + Message::parse_from_reader(&mut file).unwrap(); self.tree_id = TreeId(proto.tree_id.clone()); self.file_states = file_states_from_proto(&proto); } @@ -615,7 +615,7 @@ impl WorkingCopy { fn read_proto(&self) -> crate::protos::working_copy::Checkout { let mut file = File::open(self.state_path.join("checkout")).unwrap(); - protobuf::parse_from_reader(&mut file).unwrap() + Message::parse_from_reader(&mut file).unwrap() } /// The id of the commit that's currently checked out in the working copy.