Refactor build script

This commit is contained in:
Vlasislav Kashin
2025-07-13 15:01:40 +03:00
parent 3a2e8e6c0f
commit cb5f0d8fcc

View File

@@ -1,8 +1,9 @@
/** TODO: uncomment, move to macros and refactor
/** /**
* This file represents content of https://github.com/google/libphonenumber/tree/master/tools/cpp * This file represents content of https://github.com/google/libphonenumber/tree/master/tools/cpp
*/ */
use std::{collections::BTreeMap, fs::File, io::{BufRead, BufReader}, num::ParseIntError, path::Path};
use thiserror::Error; use thiserror::Error;
@@ -68,9 +69,9 @@ fn parse_prefixes(path: &str, prefixes: &mut BTreeMap<i32, String>) -> Result<()
Ok(()) Ok(())
} }
*/
fn main() {
fn main() -> Result<(), BuildError> {
protobuf_codegen::Codegen::new() protobuf_codegen::Codegen::new()
.pure() .pure()
.includes(["resources"]) .includes(["resources"])
@@ -78,5 +79,4 @@ fn main() -> Result<(), BuildError> {
.input("resources/phonenumber.proto") .input("resources/phonenumber.proto")
.cargo_out_dir("proto_gen") .cargo_out_dir("proto_gen")
.run_from_script(); .run_from_script();
Ok(())
} }