Skip to content

Commit 718acda

Browse files
committed
fix warnings
1 parent 9d2647f commit 718acda

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

build.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@ use rustc_version::{version_meta, Channel};
22

33
fn main() {
44
match version_meta().unwrap().channel {
5-
Channel::Nightly => println!("cargo:rustc-cfg=nightly"),
6-
Channel::Beta => println!("cargo:rustc-cfg=beta"),
5+
Channel::Nightly => {
6+
println!("cargo::rustc-check-cfg=cfg(nightly)");
7+
println!("cargo:rustc-cfg=nightly");
8+
}
9+
Channel::Beta => {
10+
println!("cargo::rustc-check-cfg=cfg(beta)");
11+
println!("cargo:rustc-cfg=beta");
12+
}
713
_ => {}
814
};
915
}

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub use types::*;
1414
pub mod wasm_exports;
1515

1616
#[cfg(test)]
17+
#[cfg(nightly)]
1718
mod tests {
1819
pub trait RoundTo<T> {
1920
fn round_to(&self, n: usize) -> T;

src/types/annoy_index_impl.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::internals::storage_ext::*;
44
use crate::types::node::*;
55
use crate::Storage;
66
use std::error::Error;
7-
use std::vec::Vec;
87

98
impl AnnoyIndex {
109
#[cfg(not(target_arch = "wasm32"))]

0 commit comments

Comments
 (0)