Skip to content

Compile error in build.rs from README.md #73

@shybyte

Description

@shybyte

Using nlprule and nlprule-build version 0.6.4 and the build.rs script from the current README.md, I get a compile error while building:

error[E0599]: no method named `validate` found for enum `Result<BinaryBuilder, nlprule_build::Error>` in the current scope
 --> build.rs:9:6
  |
9 |     .validate();
  |      ^^^^^^^^ method not found in `Result<BinaryBuilder, nlprule_build::Error>`

I have solved it by adding error propagation to builds.rs:

fn main() -> Result<(), nlprule_build::Error> {
    println!("cargo:rerun-if-changed=build.rs");
    nlprule_build::BinaryBuilder::new(
        &["en"],
        std::env::var("OUT_DIR").expect("OUT_DIR is set when build.rs is running"),
    )
    .build()?
    .validate()
}

If you want, I can make a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions