protobuf: upgrade to version 2.22.0

I only noticed that there was a newer version when running `cargo
install --path .`, which resulted in warnings about deprecated
functions. There's no other reason I'm aware of to upgrade now.
This commit is contained in:
Martin von Zweigbergk 2021-03-14 20:43:02 -07:00
parent 1ebdd4ecf0
commit 81a0e0bd2a
7 changed files with 23 additions and 27 deletions

26
Cargo.lock generated
View file

@ -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",

View file

@ -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"

View file

@ -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"

View file

@ -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);

View file

@ -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))
}

View file

@ -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))
}

View file

@ -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.