Chapter 45: Lifetimes and Assigning Renderable components
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust
調査の方向性
Chapter 45 から始め、lifetime に関する説明を、提供されている assign_render の例と比較してください。EntityBuilder::with と Renderable コンポーネントに重点を置きます。Chapter が lifetime に基づく代入を正確に説明または取り入れており、チュートリアルのコードがコンパイルできれば作業は完了です。
索引モデルが issue の本文から書いたものです。
説明
While going along with the tutorial, it was mentioned that you couldn't resolve the lifetime issues at the time. I am just dropping this off as a solution with lifetimes. My Renderer component differs slightly from the tutorial one, so I have adapted my code to it for this.
I believe the reason that the lifetimes are necessary, is because EntityBuilder::with() returns Self. This means that the passed EntityBuilder must live at least as long as assign_render is running, and since we build upon the passed builder, the one that we return must also live as long as the passed EntityBuilder, hence the connection between the three.
fn assign_render<'a>(new_entity: EntityBuilder<'a>, render: &RawRender) -> EntityBuilder<'a> {
new_entity.with(Renderable {
glyph: render.glyph,
fg: render.fg,
bg: render.bg,
colors,
})
}
- 主要言語
- Rust
- スター
- 967
- フォーク
- 165
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
amethyst/rustrogueliketutorial のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 45/100
amethyst/rustrogueliketutorial の issue をすべて見る
似ている issue
-
Make major, minor, and makedev safe on solarish targets対応中かも @xtqqczze が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Proxy ignores l5d-retry-http and l5d-retry-grpc conditions that follow a comma and space対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 3 日以内に返信
-
sncast panics when decoding a `u384` value対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
foundry-rs/starknet-foundry#4635 ·
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
crmne/omastats#31 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:desktop priority:p2 type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信