Implement sleeping #97
Annotations
44 warnings
method `to_string` is never used:
mmheroes-core-rs/tests/common.rs#L37
warning: method `to_string` is never used
--> mmheroes-core-rs/tests/common.rs:37:12
|
22 | impl TestRendererRequestConsumer {
| -------------------------------- method in this implementation
...
37 | pub fn to_string(&self) -> String {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
method `to_string` is never used:
mmheroes-core-rs/tests/common.rs#L37
warning: method `to_string` is never used
--> mmheroes-core-rs/tests/common.rs:37:12
|
22 | impl TestRendererRequestConsumer {
| -------------------------------- method in this implementation
...
37 | pub fn to_string(&self) -> String {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
method `to_string` is never used:
mmheroes-core-rs/tests/common.rs#L37
warning: method `to_string` is never used
--> mmheroes-core-rs/tests/common.rs:37:12
|
22 | impl TestRendererRequestConsumer {
| -------------------------------- method in this implementation
...
37 | pub fn to_string(&self) -> String {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
method `to_string` is never used:
mmheroes-core-rs/tests/common.rs#L37
warning: method `to_string` is never used
--> mmheroes-core-rs/tests/common.rs:37:12
|
22 | impl TestRendererRequestConsumer {
| -------------------------------- method in this implementation
...
37 | pub fn to_string(&self) -> String {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
method `to_string` is never used:
mmheroes-core-rs/tests/common.rs#L37
warning: method `to_string` is never used
--> mmheroes-core-rs/tests/common.rs:37:12
|
22 | impl TestRendererRequestConsumer {
| -------------------------------- method in this implementation
...
37 | pub fn to_string(&self) -> String {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
method `to_string` is never used:
mmheroes-core-rs/tests/common.rs#L37
warning: method `to_string` is never used
--> mmheroes-core-rs/tests/common.rs:37:12
|
22 | impl TestRendererRequestConsumer {
| -------------------------------- method in this implementation
...
37 | pub fn to_string(&self) -> String {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
method `to_string` is never used:
mmheroes-core-rs/tests/common.rs#L37
warning: method `to_string` is never used
--> mmheroes-core-rs/tests/common.rs:37:12
|
22 | impl TestRendererRequestConsumer {
| -------------------------------- method in this implementation
...
37 | pub fn to_string(&self) -> String {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
method `to_string` is never used:
mmheroes-core-rs/tests/common.rs#L37
warning: method `to_string` is never used
--> mmheroes-core-rs/tests/common.rs:37:12
|
22 | impl TestRendererRequestConsumer {
| -------------------------------- method in this implementation
...
37 | pub fn to_string(&self) -> String {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mmheroes-core-rs/src/ui/recording.rs#L268
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mmheroes-core-rs/src/ui/recording.rs:268:52
|
268 | let mut parser = InputRecordingParser::new(&input);
| ^^^^^^ help: change this to: `input`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mmheroes-core-rs/src/ui/recording.rs#L249
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mmheroes-core-rs/src/ui/recording.rs:249:52
|
249 | let mut parser = InputRecordingParser::new(&input);
| ^^^^^^ help: change this to: `input`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mmheroes-core-rs/src/ui/recording.rs#L203
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mmheroes-core-rs/src/ui/recording.rs:203:52
|
203 | let mut parser = InputRecordingParser::new(&input);
| ^^^^^^ help: change this to: `input`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
name `RRC` contains a capitalized acronym:
mmheroes-core-rs/src/ui/renderer.rs#L124
warning: name `RRC` contains a capitalized acronym
--> mmheroes-core-rs/src/ui/renderer.rs:124:12
|
124 | struct RRC {
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Rrc`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
= note: `#[warn(clippy::upper_case_acronyms)]` on by default
|
this function has too many arguments (8/7):
mmheroes-core-rs/src/ui/screens/train.rs#L86
warning: this function has too many arguments (8/7)
--> mmheroes-core-rs/src/ui/screens/train.rs:86:1
|
86 | / fn display_train<R: RendererRequestConsumer>(
87 | | r: &mut Renderer<R>,
88 | | available_actions: &[Action],
89 | | state: &GameState,
... |
94 | | gatecrash: &dyn Fn(&mut Renderer<R>, bool) -> (),
95 | | ) -> WaitingState {
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
this function has too many arguments (8/7):
mmheroes-core-rs/src/ui/screens/train.rs#L86
warning: this function has too many arguments (8/7)
--> mmheroes-core-rs/src/ui/screens/train.rs:86:1
|
86 | / fn display_train<R: RendererRequestConsumer>(
87 | | r: &mut Renderer<R>,
88 | | available_actions: &[Action],
89 | | state: &GameState,
... |
94 | | gatecrash: &dyn Fn(&mut Renderer<R>, bool) -> (),
95 | | ) -> WaitingState {
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
large size difference between variants:
mmheroes-core-rs/src/logic/scene_router/train.rs#L25
warning: large size difference between variants
--> mmheroes-core-rs/src/logic/scene_router/train.rs:25:1
|
25 | / pub enum BaltiyskiyRailwayStationScene {
26 | | /// "Ты в Питере, на Балтийском вокзале. Куда направляемся?"
27 | | Prompt(GameState),
| | ----------------- the largest variant contains at least 232 bytes
... |
30 | | CaughtByInspectors,
| | ------------------ the second-largest variant carries no data at all
31 | | }
| |_^ the entire enum is at least 232 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
|
27 | Prompt(Box<GameState>),
| ~~~~~~~~~~~~~~
|
large size difference between variants:
mmheroes-core-rs/src/logic/scene_router/train.rs#L25
warning: large size difference between variants
--> mmheroes-core-rs/src/logic/scene_router/train.rs:25:1
|
25 | / pub enum BaltiyskiyRailwayStationScene {
26 | | /// "Ты в Питере, на Балтийском вокзале. Куда направляемся?"
27 | | Prompt(GameState),
| | ----------------- the largest variant contains at least 232 bytes
... |
30 | | CaughtByInspectors,
| | ------------------ the second-largest variant carries no data at all
31 | | }
| |_^ the entire enum is at least 232 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
|
27 | Prompt(Box<GameState>),
| ~~~~~~~~~~~~~~
|
manual implementation of an assign operation:
mmheroes-core-rs/src/logic/subject_status.rs#L5
warning: manual implementation of an assign operation
--> mmheroes-core-rs/src/logic/subject_status.rs:5:1
|
5 | #[bitfield(u16, debug = false, default = false)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: this warning originates in the attribute macro `bitfield` (in Nightly builds, run with -Z macro-backtrace for more info)
|
manual implementation of an assign operation:
mmheroes-core-rs/src/logic/player.rs#L5
warning: manual implementation of an assign operation
--> mmheroes-core-rs/src/logic/player.rs:5:1
|
5 | #[bitfield(u16, debug = true, default = false)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: this warning originates in the attribute macro `bitfield` (in Nightly builds, run with -Z macro-backtrace for more info)
|
manual implementation of an assign operation:
mmheroes-core-rs/src/logic/subject_status.rs#L5
warning: manual implementation of an assign operation
--> mmheroes-core-rs/src/logic/subject_status.rs:5:1
|
5 | #[bitfield(u16, debug = false, default = false)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: this warning originates in the attribute macro `bitfield` (in Nightly builds, run with -Z macro-backtrace for more info)
|
large size difference between variants:
mmheroes-core-rs/src/logic/npc/nil.rs#L7
warning: large size difference between variants
--> mmheroes-core-rs/src/logic/npc/nil.rs:7:1
|
7 | / pub enum NilInteraction {
8 | | /// "Маладой чилавек, вы мне не паможите решить задачу?
9 | | /// А то я сигодня ни в зуб нагой ..."
10 | | WillYouHelpMe(GameState),
| | ------------------------ the largest variant contains at least 232 bytes
... |
15 | | ThanksHereIsYourMoney(Money),
| | ---------------------------- the second-largest variant contains at least 2 bytes
... |
18 | | DidntWorkOut,
19 | | }
| |_^ the entire enum is at least 232 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
|
10 | WillYouHelpMe(Box<GameState>),
| ~~~~~~~~~~~~~~
|
manual implementation of an assign operation:
mmheroes-core-rs/src/logic/player.rs#L5
warning: manual implementation of an assign operation
--> mmheroes-core-rs/src/logic/player.rs:5:1
|
5 | #[bitfield(u16, debug = true, default = false)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: this warning originates in the attribute macro `bitfield` (in Nightly builds, run with -Z macro-backtrace for more info)
|
large size difference between variants:
mmheroes-core-rs/src/logic/npc/andrew.rs#L4
warning: large size difference between variants
--> mmheroes-core-rs/src/logic/npc/andrew.rs:4:1
|
4 | / pub enum AndrewInteraction {
5 | | /// "Обратиться к Эндрю за помощью?"
6 | | PromptHelpFromAndrew(GameState),
| | ------------------------------- the largest variant contains at least 232 bytes
... |
12 | |/ ScorePrediction {
13 | || subject: Subject,
14 | || prediction: u8,
15 | || },
| ||_____- the second-largest variant contains at least 2 bytes
... |
24 | | AndrewIgnoresYou,
25 | | }
| |__^ the entire enum is at least 232 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
|
6 | PromptHelpFromAndrew(Box<GameState>),
| ~~~~~~~~~~~~~~
|
large size difference between variants:
mmheroes-core-rs/src/logic/npc/nil.rs#L7
warning: large size difference between variants
--> mmheroes-core-rs/src/logic/npc/nil.rs:7:1
|
7 | / pub enum NilInteraction {
8 | | /// "Маладой чилавек, вы мне не паможите решить задачу?
9 | | /// А то я сигодня ни в зуб нагой ..."
10 | | WillYouHelpMe(GameState),
| | ------------------------ the largest variant contains at least 232 bytes
... |
15 | | ThanksHereIsYourMoney(Money),
| | ---------------------------- the second-largest variant contains at least 2 bytes
... |
18 | | DidntWorkOut,
19 | | }
| |_^ the entire enum is at least 232 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
|
10 | WillYouHelpMe(Box<GameState>),
| ~~~~~~~~~~~~~~
|
manual implementation of an assign operation:
mmheroes-core-rs/src/logic/game_state.rs#L6
warning: manual implementation of an assign operation
--> mmheroes-core-rs/src/logic/game_state.rs:6:1
|
6 | #[bitfield(u32, debug = false, default = false)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
= note: this warning originates in the attribute macro `bitfield` (in Nightly builds, run with -Z macro-backtrace for more info)
|
large size difference between variants:
mmheroes-core-rs/src/logic/npc/andrew.rs#L4
warning: large size difference between variants
--> mmheroes-core-rs/src/logic/npc/andrew.rs:4:1
|
4 | / pub enum AndrewInteraction {
5 | | /// "Обратиться к Эндрю за помощью?"
6 | | PromptHelpFromAndrew(GameState),
| | ------------------------------- the largest variant contains at least 232 bytes
... |
12 | |/ ScorePrediction {
13 | || subject: Subject,
14 | || prediction: u8,
15 | || },
| ||_____- the second-largest variant contains at least 2 bytes
... |
24 | | AndrewIgnoresYou,
25 | | }
| |__^ the entire enum is at least 232 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
|
6 | PromptHelpFromAndrew(Box<GameState>),
| ~~~~~~~~~~~~~~
|
manual implementation of an assign operation:
mmheroes-core-rs/src/logic/game_state.rs#L6
warning: manual implementation of an assign operation
--> mmheroes-core-rs/src/logic/game_state.rs:6:1
|
6 | #[bitfield(u32, debug = false, default = false)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
= note: this warning originates in the attribute macro `bitfield` (in Nightly builds, run with -Z macro-backtrace for more info)
|
use of a fallible conversion when an infallible one could be used:
mmheroes-core-rs/src/logic/timetable.rs#L115
warning: use of a fallible conversion when an infallible one could be used
--> mmheroes-core-rs/src/logic/timetable.rs:115:9
|
115 | u64::try_from(value.0)
| ^^^^^^^^^^^^^ help: use: `From::from`
|
= note: converting `u8` to `u64` cannot fail
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
= note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default
|
transmute used without annotations:
mmheroes-core-rs/src/ffi.rs#L499
warning: transmute used without annotations
--> mmheroes-core-rs/src/ffi.rs:499:28
|
499 | core::mem::transmute(scores.as_mut_ptr()),
| ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*mut std::mem::MaybeUninit<ffi::FfiHighScore>, *mut ffi::FfiHighScore>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
= note: `#[warn(clippy::missing_transmute_annotations)]` on by default
|
use of a fallible conversion when an infallible one could be used:
mmheroes-core-rs/src/logic/timetable.rs#L115
warning: use of a fallible conversion when an infallible one could be used
--> mmheroes-core-rs/src/logic/timetable.rs:115:9
|
115 | u64::try_from(value.0)
| ^^^^^^^^^^^^^ help: use: `From::from`
|
= note: converting `u8` to `u64` cannot fail
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
= note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default
|
the following explicit lifetimes could be elided: 'a:
mmheroes-core-rs/src/util/async_support.rs#L119
warning: the following explicit lifetimes could be elided: 'a
--> mmheroes-core-rs/src/util/async_support.rs:119:6
|
119 | impl<'a, Input: Any + Unpin, Output: Any + Unpin> Future for MyFuture<'a, Input, Output> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
119 - impl<'a, Input: Any + Unpin, Output: Any + Unpin> Future for MyFuture<'a, Input, Output> {
119 + impl<Input: Any + Unpin, Output: Any + Unpin> Future for MyFuture<'_, Input, Output> {
|
|
the following explicit lifetimes could be elided: 'a:
mmheroes-core-rs/src/util/async_support.rs#L119
warning: the following explicit lifetimes could be elided: 'a
--> mmheroes-core-rs/src/util/async_support.rs:119:6
|
119 | impl<'a, Input: Any + Unpin, Output: Any + Unpin> Future for MyFuture<'a, Input, Output> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
119 - impl<'a, Input: Any + Unpin, Output: Any + Unpin> Future for MyFuture<'a, Input, Output> {
119 + impl<Input: Any + Unpin, Output: Any + Unpin> Future for MyFuture<'_, Input, Output> {
|
|
unused variable: `hiccup`:
mmheroes-core-rs/src/ui/screens/terkom.rs#L64
warning: unused variable: `hiccup`
--> mmheroes-core-rs/src/ui/screens/terkom.rs:64:28
|
64 | Terkom::MMHEROES { hiccup } => {
| ^^^^^^ help: try ignoring the field: `hiccup: _`
|
unused variable: `hiccup`:
mmheroes-core-rs/src/ui/screens/terkom.rs#L64
warning: unused variable: `hiccup`
--> mmheroes-core-rs/src/ui/screens/terkom.rs:64:28
|
64 | Terkom::MMHEROES { hiccup } => {
| ^^^^^^ help: try ignoring the field: `hiccup: _`
|
unused variable: `state`:
mmheroes-core-rs/src/logic/sleep.rs#L53
warning: unused variable: `state`
--> mmheroes-core-rs/src/logic/sleep.rs:53:48
|
53 | async fn dreams(g: &mut InternalGameState<'_>, state: &mut GameState) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `g`:
mmheroes-core-rs/src/logic/sleep.rs#L53
warning: unused variable: `g`
--> mmheroes-core-rs/src/logic/sleep.rs:53:17
|
53 | async fn dreams(g: &mut InternalGameState<'_>, state: &mut GameState) {
| ^ help: if this is intentional, prefix it with an underscore: `_g`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `state`:
mmheroes-core-rs/src/logic/sleep.rs#L53
warning: unused variable: `state`
--> mmheroes-core-rs/src/logic/sleep.rs:53:48
|
53 | async fn dreams(g: &mut InternalGameState<'_>, state: &mut GameState) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `g`:
mmheroes-core-rs/src/logic/sleep.rs#L53
warning: unused variable: `g`
--> mmheroes-core-rs/src/logic/sleep.rs:53:17
|
53 | async fn dreams(g: &mut InternalGameState<'_>, state: &mut GameState) {
| ^ help: if this is intentional, prefix it with an underscore: `_g`
|
= note: `#[warn(unused_variables)]` on by default
|
unneeded unit return type:
mmheroes-core-rs/src/ui/screens/train.rs#L94
warning: unneeded unit return type
--> mmheroes-core-rs/src/ui/screens/train.rs:94:47
|
94 | gatecrash: &dyn Fn(&mut Renderer<R>, bool) -> (),
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
|
unneeded unit return type:
mmheroes-core-rs/src/ui/screens/train.rs#L94
warning: unneeded unit return type
--> mmheroes-core-rs/src/ui/screens/train.rs:94:47
|
94 | gatecrash: &dyn Fn(&mut Renderer<R>, bool) -> (),
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
|
build-rust
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
build-ios
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
build-ios
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
build-ios
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
build-ios
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|