Skip to content

Commit

Permalink
Update dependencies and remove deprecations.
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin committed Jan 10, 2021
1 parent ea72ea0 commit aee2a49
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 156 deletions.
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ categories = ["api-bindings", "hardware-support", "multimedia"]
edition = "2018"

[dependencies]
byteorder = "1.3.4"
log = "0.4.8"
openssl = "0.10.28"
protobuf = "=2.10.1"
serde = "1.0.104"
serde_derive = "1.0.104"
serde_json = "1.0.48"
byteorder = "1.4.2"
log = "0.4.11"
openssl = "0.10.32"
protobuf = "=2.20.0"
serde = "1.0.118"
serde_derive = "1.0.118"
serde_json = "1.0.61"

[build-dependencies]
protoc-rust = "=2.10.1"
protoc-rust = "=2.20.0"

[features]
thread_safe = []
19 changes: 7 additions & 12 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
use std::env;
extern crate protoc_rust;

use protoc_rust::Customize;

fn main() {
let generate_proto = env::var("GENERATE_PROTO").unwrap_or_else(|_| "false".to_string());
if generate_proto == "true" {
protoc_rust::run(protoc_rust::Args {
out_dir: "src/cast",
input: &[
protoc_rust::Codegen::new()
.out_dir("src/cast")
.inputs(&[
"protobuf/authority_keys.proto",
"protobuf/cast_channel.proto",
],
includes: &["protobuf"],
customize: Customize {
..Default::default()
},
})
.expect("protoc");
])
.includes(&["protobuf"])
.run()
.expect("protoc");
}

println!("rerun-if-env-changed=GENERATE_PROTO");
Expand Down
43 changes: 15 additions & 28 deletions src/cast/authority_keys.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// This file is generated by rust-protobuf 2.10.1. Do not edit
// This file is generated by rust-protobuf 2.20.0. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_attributes)]
#![rustfmt::skip]

#![allow(box_pointers)]
#![allow(dead_code)]
Expand All @@ -14,22 +15,18 @@
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `authority_keys.proto`
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;

/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_1;
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_20_0;

#[derive(PartialEq,Clone,Default,Debug)]
pub struct AuthorityKeys {
// message fields
keys: ::protobuf::RepeatedField<AuthorityKeys_Key>,
pub keys: ::protobuf::RepeatedField<AuthorityKeys_Key>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
Expand Down Expand Up @@ -138,7 +135,7 @@ impl ::protobuf::Message for AuthorityKeys {
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}

Expand All @@ -151,13 +148,8 @@ impl ::protobuf::Message for AuthorityKeys {
}

fn default_instance() -> &'static AuthorityKeys {
static mut instance: ::protobuf::lazy::Lazy<AuthorityKeys> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const AuthorityKeys,
};
unsafe {
instance.get(AuthorityKeys::new)
}
static instance: ::protobuf::rt::LazyV2<AuthorityKeys> = ::protobuf::rt::LazyV2::INIT;
instance.get(AuthorityKeys::new)
}
}

Expand All @@ -169,8 +161,8 @@ impl ::protobuf::Clear for AuthorityKeys {
}

impl ::protobuf::reflect::ProtobufValue for AuthorityKeys {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}

Expand Down Expand Up @@ -341,7 +333,7 @@ impl ::protobuf::Message for AuthorityKeys_Key {
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}

Expand All @@ -354,13 +346,8 @@ impl ::protobuf::Message for AuthorityKeys_Key {
}

fn default_instance() -> &'static AuthorityKeys_Key {
static mut instance: ::protobuf::lazy::Lazy<AuthorityKeys_Key> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const AuthorityKeys_Key,
};
unsafe {
instance.get(AuthorityKeys_Key::new)
}
static instance: ::protobuf::rt::LazyV2<AuthorityKeys_Key> = ::protobuf::rt::LazyV2::INIT;
instance.get(AuthorityKeys_Key::new)
}
}

Expand All @@ -373,7 +360,7 @@ impl ::protobuf::Clear for AuthorityKeys_Key {
}

impl ::protobuf::reflect::ProtobufValue for AuthorityKeys_Key {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
Loading

0 comments on commit aee2a49

Please sign in to comment.