Closed leshow closed 6 years ago
Hi @leshow, that looks like a bug --- I haven't yet set up a CI build for the std
feature flag; the test
task builds fine so I was foolishly assuming --features="std"
would also work. I'll fix this.
Yes I was able to write some new code and runs tests fine. I think it's possible 'alloc' should to be added as a feature to intruder_alarm
? It has cfg(feature="alloc")
flags but the feature is absent from Cargo.toml
@leshow yeah, that's correct. I think #27 should fix all the issues you're seeing, can you check it out and confirm?
(well, fixes everything except for cargo build -p $PACKAGE --features $WHATEVER
not passing features to the specified package as one would expect, but that's not our fault...)
I tried your branch and it builds fine, thanks. Off topic, but can I ask if there's a reason you write the bounds like:
where
Node: Linked,
Node: Into<T>,
as opposed to:
Node: Linked + Into<T>
I assume they are equivalent.
@leshow yes, they should be equivalent; I've just gotten into the habit of writing each bound on a separate line because it's the convention of some other projects I contribute to. Don't feel obligated to write bounds that way here --- rustfmt
won't enforce whether to use the +
or separate bounds.
I was thinking of taking an issue so I cloned the project and ran
cargo build
from the root dir, all appears to compile fine. I tried to add the extend trait fordoubly
behind a#[cfg(any(feature="alloc", feature = "std", test))]
However cargo build seems to just skip over the code there (I can leave typos in it and everything will still compile).
I'm wondering what I'm missing to get your library to compile? I tried compiling
intruder_alarm
independently also with--features="std"
and this produces a bunch of errors:How are you meant to build this library? How do you get everything to build behind the conditional compilation features?