Compare commits

..

3 Commits

Author SHA1 Message Date
f94a51027b Update dependencies to their latest versions
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-19 18:58:34 +01:00
f5f2efcfde cargo update 2023-03-19 18:56:46 +01:00
eb9999b85b Fix build issue 2023-03-19 18:54:44 +01:00
4 changed files with 489 additions and 344 deletions

817
rust/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@ categories = [ "games" ]
[dependencies]
clap = { version = "4.0.16", features = ["derive"] }
log = "0.4.17"
env_logger = "0.9.0"
env_logger = "0.10.0"
serde = { version = "1.0.145", features = ["derive"] }
serde_json = "1.0.85"
actix-web = "4.1.0"
@@ -30,6 +30,6 @@ semver = "1.0.14"
[dev-dependencies]
#reqwest = { version = "0.11.11", default-features = false, features = ["json", "rustls-tls"] }
tokio-tungstenite = "0.17.2"
tokio-tungstenite = "0.18.0"
serde_urlencoded = "0.7.1"
futures = "0.3.23"

View File

@@ -15,16 +15,16 @@ categories = [ "games" ]
sea_battle_backend = { path = "../sea_battle_backend", version = "0.2.0" }
clap = { version = "4.0.16", features = ["derive"] }
log = "0.4.17"
env_logger = "0.9.0"
env_logger = "0.10.0"
tui = "0.19.0"
crossterm = "0.25.0"
crossterm = "0.26.1"
lazy_static = "1.4.0"
tokio = "1.21.2"
num = "0.4.0"
num-traits = "0.2.15"
num-derive = "0.3.3"
textwrap = "0.15.1"
tokio-tungstenite = { version = "0.17.2", features = ["__rustls-tls", "rustls-tls-native-roots"] }
textwrap = "0.16.0"
tokio-tungstenite = { version = "0.18.0", features = ["__rustls-tls", "rustls-tls-native-roots"] }
serde_urlencoded = "0.7.1"
futures = "0.3.23"
serde_json = "1.0.85"

View File

@@ -25,7 +25,7 @@ use crate::ui_widgets::button_widget::ButtonWidget;
use crate::ui_widgets::checkbox_widget::CheckboxWidget;
use crate::ui_widgets::text_editor_widget::TextEditorWidget;
#[derive(num_derive::FromPrimitive, num_derive::ToPrimitive, Eq, PartialEq)]
#[derive(num_derive::FromPrimitive, num_derive::ToPrimitive, Eq, PartialEq, Copy, Clone)]
enum EditingField {
MapWidth = 0,
MapHeight,
@@ -128,7 +128,7 @@ impl GameRulesConfigurationScreen {
}
}
KeyCode::Char(c) if ('0'..='9').contains(&c) => {
KeyCode::Char(c) if c.is_ascii_digit() => {
let val = c.to_string().parse::<usize>().unwrap_or_default();
if self.curr_field == EditingField::MapWidth