Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hanabi1224 committed Sep 4, 2024
1 parent 9d2647f commit 718acda
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ use rustc_version::{version_meta, Channel};

fn main() {
match version_meta().unwrap().channel {
Channel::Nightly => println!("cargo:rustc-cfg=nightly"),
Channel::Beta => println!("cargo:rustc-cfg=beta"),
Channel::Nightly => {
println!("cargo::rustc-check-cfg=cfg(nightly)");
println!("cargo:rustc-cfg=nightly");
}
Channel::Beta => {
println!("cargo::rustc-check-cfg=cfg(beta)");
println!("cargo:rustc-cfg=beta");
}
_ => {}
};
}
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub use types::*;
pub mod wasm_exports;

#[cfg(test)]
#[cfg(nightly)]
mod tests {
pub trait RoundTo<T> {
fn round_to(&self, n: usize) -> T;
Expand Down
1 change: 0 additions & 1 deletion src/types/annoy_index_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use crate::internals::storage_ext::*;
use crate::types::node::*;
use crate::Storage;
use std::error::Error;
use std::vec::Vec;

impl AnnoyIndex {
#[cfg(not(target_arch = "wasm32"))]
Expand Down

0 comments on commit 718acda

Please sign in to comment.