softprops / hyperlocal

🔌 ✨rustlang hyper bindings for local unix domain sockets
MIT License
227 stars 46 forks source link

Does not compile if client-only #35

Closed utopiabound closed 3 years ago

utopiabound commented 4 years ago

In my crate I have the following in my Cargo.toml

hyperlocal = { version = "0.7", features = [ "client" ], default_features = false }

I get the following error:

   Checking hyperlocal v0.7.0
error[E0433]: failed to resolve: unresolved import
  --> /home/nate/.cargo/registry/src/github.com-1ecc6299db9ec823/hyperlocal-0.7.0/src/lib.rs:41:16
   |
41 | pub use crate::server::conn::SocketIncoming;
   |                ^^^^^^
   |                |
   |                unresolved import
   |                help: a similar path exists: `hyper::server`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0433`.
error: could not compile `hyperlocal`.

This would appear to be because https://github.com/softprops/hyperlocal/blob/master/src/lib.rs#L41 is not preceded with #[cfg(feature = "server")]