Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling failure: unresolved import self::hyper::header::Authorization #7

Open
Jnchi opened this issue Dec 11, 2018 · 1 comment
Open

Comments

@Jnchi
Copy link

Jnchi commented Dec 11, 2018

Running `rustc --crate-name nss_aad src/lib.rs --crate-type cdylib --emit=dep-info,link -C debuginfo=2 -C metadata=16a40248680afd7c --out-dir /home/ubuntu/libnss-aad/target/debug/deps -C incremental=/home/ubuntu/libnss-aad/target/de
bug/incremental -L dependency=/home/ubuntu/libnss-aad/target/debug/deps --extern hyper=/home/ubuntu/libnss-aad/target/debug/deps/libhyper-e9918e5bef9d98fb.rlib --extern hyper_native_tls=/home/ubuntu/libnss-aad/target/debug/deps/libhyper_
native_tls-56043d157eb4a3d5.rlib --extern libc=/home/ubuntu/libnss-aad/target/debug/deps/liblibc-9f14cf0e2608b5f0.rlib --extern serde=/home/ubuntu/libnss-aad/target/debug/deps/libserde-851ce8d3851676bb.rlib --extern serde_derive=/home/ub
untu/libnss-aad/target/debug/deps/libserde_derive-073019fa6a22df1a.so --extern serde_json=/home/ubuntu/libnss-aad/target/debug/deps/libserde_json-0cba26387cd53a3d.rlib --extern serde_yaml=/home/ubuntu/libnss-aad/target/debug/deps/libserd
e_yaml-1adef8e3cfd320d9.rlib --extern url=/home/ubuntu/libnss-aad/target/debug/deps/liburl-badac701df3f14f3.rlib`
error[E0432]: unresolved import `self::hyper::header::Authorization`
  --> src/azure.rs:12:27
   |
12 | use self::hyper::header::{Authorization, Bearer, Headers};
   |                           ^^^^^^^^^^^^^ no `Authorization` in `header`

error[E0432]: unresolved import `self::hyper::header::Bearer`
  --> src/azure.rs:12:42
   |
12 | use self::hyper::header::{Authorization, Bearer, Headers};
   |                                          ^^^^^^ no `Bearer` in `header`

error[E0432]: unresolved import `self::hyper::header::Headers`
  --> src/azure.rs:12:50
   |
12 | use self::hyper::header::{Authorization, Bearer, Headers};
   |                                                  ^^^^^^^ no `Headers` in `header`

error[E0432]: unresolved import `self::hyper::net`
  --> src/azure.rs:13:18
   |
13 | use self::hyper::net::HttpsConnector;
   |                  ^^^ Could not find `net` in `hyper`

error[E0432]: unresolved import `hyper::status`
  --> src/lib.rs:20:12
   |
20 | use hyper::status::StatusCode;
   |            ^^^^^^ Could not find `status` in `hyper`

error[E0433]: failed to resolve. Could not find `status` in `hyper`
  --> src/azure.rs:36:34
   |
36 |     if response.status != hyper::status::StatusCode::Ok {
   |                                  ^^^^^^ Could not find `status` in `hyper`

error[E0433]: failed to resolve. Could not find `status` in `hyper`
  --> src/azure.rs:56:34
   |
56 |     if response.status != hyper::status::StatusCode::Ok {
   |                                  ^^^^^^ Could not find `status` in `hyper`

error[E0433]: failed to resolve. Could not find `status` in `hyper`
   --> src/azure.rs:281:45
    |
281 |                         if status == hyper::status::StatusCode::NotFound {
    |                                             ^^^^^^ Could not find `status` in `hyper`

error[E0433]: failed to resolve. Could not find `status` in `hyper`
  --> src/error.rs:29:24
   |
29 |         status: hyper::status::StatusCode,
   |                        ^^^^^^ Could not find `status` in `hyper`

error[E0243]: wrong number of type arguments: expected at least 1, found 0
  --> src/azure.rs:21:24
   |
21 | fn get_ssl_client() -> hyper::Client {
   |                        ^^^^^^^^^^^^^ expected at least 1 type argument

error: aborting due to 10 previous errors

Some errors occurred: E0243, E0432, E0433.
For more information about an error, try `rustc --explain E0243`.
error: Could not compile `nss-aad`.

Caused by:
  process didn't exit successfully: `rustc --crate-name nss_aad src/lib.rs --crate-type cdylib --emit=dep-info,link -C debuginfo=2 -C metadata=16a40248680afd7c --out-dir /home/ubuntu/libnss-aad/target/debug/deps -C incremental=/home/ubun
tu/libnss-aad/target/debug/incremental -L dependency=/home/ubuntu/libnss-aad/target/debug/deps --extern hyper=/home/ubuntu/libnss-aad/target/debug/deps/libhyper-e9918e5bef9d98fb.rlib --extern hyper_native_tls=/home/ubuntu/libnss-aad/targ
et/debug/deps/libhyper_native_tls-56043d157eb4a3d5.rlib --extern libc=/home/ubuntu/libnss-aad/target/debug/deps/liblibc-9f14cf0e2608b5f0.rlib --extern serde=/home/ubuntu/libnss-aad/target/debug/deps/libserde-851ce8d3851676bb.rlib --exter
n serde_derive=/home/ubuntu/libnss-aad/target/debug/deps/libserde_derive-073019fa6a22df1a.so --extern serde_json=/home/ubuntu/libnss-aad/target/debug/deps/libserde_json-0cba26387cd53a3d.rlib --extern serde_yaml=/home/ubuntu/libnss-aad/ta
rget/debug/deps/libserde_yaml-1adef8e3cfd320d9.rlib --extern url=/home/ubuntu/libnss-aad/target/debug/deps/liburl-badac701df3f14f3.rlib` (exit code: 101)

See also: hyperium/hyper#1656

@Jnchi
Copy link
Author

Jnchi commented Dec 11, 2018

diff --git a/Cargo.toml b/Cargo.toml
index ba32ce6..1dd34b7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,7 +5,7 @@ authors = ["Brandon Matthews <[email protected]>"]


 [dependencies]
-hyper = "*"
+hyper = "0.10.9"
 hyper-native-tls = "0.2.2"
 libc = "0.2.21"
 serde = "0.9"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant