The example doesn't work with latest version 0.14.12
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- rust
調査の方向性
プロジェクトのホームページに表示されている Rust コード例から始め、バージョン 0.14.12 で未解決の hyper::Server インポートを再現します。そのバージョンで動作するように例を更新し、表示されているコードが正常にコンパイルできることを確認します。
索引モデルが issue の本文から書いたものです。
説明
The given code on your home page:
use std::{convert::Infallible, net::SocketAddr};
use hyper::{Body, Request, Response, Server};
use hyper::service::{make_service_fn, service_fn};
async fn handle(_: Request<Body>) -> Result<Response<Body>, Infallible> {
Ok(Response::new("Hello, World!".into()))
}
#[tokio::main]
async fn main() {
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
let make_svc = make_service_fn(|_conn| async {
Ok::<_, Infallible>(service_fn(handle))
});
let server = Server::bind(&addr).serve(make_svc);
if let Err(e) = server.await {
eprintln!("server error: {}", e);
}
}
The result:
Compiling http-server v0.1.0 (/Users/chiro/GitHub/rust-playground/http-server)
error[E0432]: unresolved import `hyper::Server`
--> src/main.rs:2:38
|
2 | use hyper::{Body, Request, Response, Server};
| ^^^^^^ no `Server` in the root
error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.
error: could not compile `http-server`
To learn more, run the command again with --verbose.
- 主要言語
- HTML
- スター
- 34
- フォーク
- 71
- 平均マージ
- 1時間 9分
- マージ済み PR(30日)
- 8
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hyperium/hyperium.github.io のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
hyperium/hyperium.github.io#58 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
hyperium/hyperium.github.io#57 · コメント 2 件 ·
-
TLS server support? オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
hyperium/hyperium.github.io#46 · コメント 4 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
hyperium/hyperium.github.io の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bancolombia/sentinel#22 ·
-
test md オープンCI
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
optimization optimization:agents-md-curator
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
githubnext/gh-aw-cao#13143 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
objectionary/hone-maven-plugin#1061 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
redhat-developer/rhdh-plugins#4887 · コメント 2 件 ·