Skip to content

Commit ec94b78

Browse files
committed
made it easier to add borsch to more types by not using vectors
1 parent 5871ab8 commit ec94b78

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

program/rust/build.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ use std::vec::Vec;
55
fn main() {
66
println!("cargo:rustc-link-search=../c/target");
77

8-
let borsh_derives: Vec<String> =
9-
vec!["BorshSerialize".to_string(), "BorshDeserialize".to_string()];
8+
let borsh_derives = ["BorshSerialize".to_string(), "BorshDeserialize".to_string()];
109

1110
//make a parser and to it type, traits pairs
1211
let mut parser = build_utils::DeriveAdderParserCallback::new();
13-
parser.register_traits("cmd_hdr", borsh_derives);
12+
parser.register_traits("cmd_hdr", borsh_derives.to_vec());
13+
parser.register_traits("pc_acc", borsh_derives.to_vec());
14+
1415

1516
//generate and write bindings
1617
let bindings = Builder::default()

0 commit comments

Comments
 (0)