hyperium / hyperium/hyperium.github.io

The example doesn't work with latest version 0.14.12

オープン
#68 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
HTML
スター
34
フォーク
71
平均マージ
1時間 9分
マージ済み PR(30日)
8

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

プロジェクトのホームページに表示されている Rust コード例から始め、バージョン 0.14.12 で未解決の hyper::Server インポートを再現します。そのバージョンで動作するように例を更新し、表示されているコードが正常にコンパイルできることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。