Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
kingwingfly committed Mar 3, 2024
1 parent 48db47a commit 010e9a1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fav_utils/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#[cfg(test)]
use protobuf::reflect::MessageDescriptor;
#[cfg(test)]
use protobuf_codegen::{Codegen, Customize, CustomizeCallback};
use rustc_version::{version_meta, Channel};

Expand All @@ -13,7 +11,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Channel::Dev => "CHANNEL_DEV",
};
println!("cargo:rustc-cfg={}", channel);
#[cfg(test)]
Codegen::new()
.pure()
.includes(["proto"])
Expand All @@ -27,9 +24,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}

#[cfg(test)]
struct MyCustomizeCallback;
#[cfg(test)]

impl CustomizeCallback for MyCustomizeCallback {
fn message(&self, message: &MessageDescriptor) -> Customize {
let name = message.name();
Expand All @@ -42,10 +38,7 @@ impl CustomizeCallback for MyCustomizeCallback {
}
}

#[cfg(test)]
const DERIVE_UPPER: &str = "#[derive(fav_core::attr::Attr)]\n#[attr(id(mid), title(name))]";
#[cfg(test)]
const DERIVE_BILIRES: &str =
"#[derive(fav_core::attr::Attr, fav_core::status::Status)]\n#[attr(id(bvid))]";
#[cfg(test)]
const DERIVE_BILISET: &str = "#[derive(fav_core::attr::Attr, fav_core::status::Status)]";

0 comments on commit 010e9a1

Please sign in to comment.