1
This commit is contained in:
parent
16f184bc15
commit
02b4f98a3e
@ -1,6 +1,5 @@
|
|||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::fs::File;
|
|
||||||
use protobuf::Message;
|
use protobuf::Message;
|
||||||
use protobuf::descriptor::FieldDescriptorProto_Type;
|
use protobuf::descriptor::FieldDescriptorProto_Type;
|
||||||
|
|
||||||
@ -35,7 +34,7 @@ impl r9::ProtoMsg for MessagesUnion {
|
|||||||
Some(v) => {
|
Some(v) => {
|
||||||
match field_desc.get_field_type() {
|
match field_desc.get_field_type() {
|
||||||
FieldDescriptorProto_Type::TYPE_STRING => {
|
FieldDescriptorProto_Type::TYPE_STRING => {
|
||||||
os.write_string(field_desc.get_number() as u32, "hello");
|
os.write_string(field_desc.get_number() as u32, v.as_str().unwrap());
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
|
|
||||||
@ -74,8 +73,6 @@ macro_rules! getMeta {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut metamgr = MetaMgr::new();
|
let mut metamgr = MetaMgr::new();
|
||||||
let c = metamgr.get_metalist(1);
|
|
||||||
let idx = 0;
|
|
||||||
let p = metawrap::MtwAliKeyConf{
|
let p = metawrap::MtwAliKeyConf{
|
||||||
p: RefCell::new(crate::mt::AliKeyConf::new())
|
p: RefCell::new(crate::mt::AliKeyConf::new())
|
||||||
};
|
};
|
||||||
@ -88,10 +85,9 @@ fn main() {
|
|||||||
MessagesUnion::MtwAliKeyConf(dummy)
|
MessagesUnion::MtwAliKeyConf(dummy)
|
||||||
);
|
);
|
||||||
metamgr.load();
|
metamgr.load();
|
||||||
let b = getMeta!(metamgr, MtwAliKeyConf, idx);
|
let b = getMeta!(metamgr, MtwAliKeyConf, 0);
|
||||||
match b {
|
match b {
|
||||||
Some(v) => {
|
Some(v) => {
|
||||||
println!("abcde22222");
|
|
||||||
println!("{}", v.p.borrow().get_access_keyid());
|
println!("{}", v.p.borrow().get_access_keyid());
|
||||||
println!("{}", v.p.borrow().get_access_secret());
|
println!("{}", v.p.borrow().get_access_secret());
|
||||||
}
|
}
|
||||||
|
2
third_party/r9
vendored
2
third_party/r9
vendored
@ -1 +1 @@
|
|||||||
Subproject commit bd11c1108eb78ada3b27c56b762cc31e3c3ad029
|
Subproject commit 9f8a1d68897f7c86a606b3cfa70f5fd0612e26f7
|
Loading…
x
Reference in New Issue
Block a user