Skip to content

Commit

Permalink
bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson committed Jan 15, 2025
1 parent 80ce556 commit 90c5e69
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 52 deletions.
111 changes: 77 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ members = [
]

[workspace.dependencies]
serde = "1.0.203"
serde_json = "1.0.117"
serde = "1.0.217"
serde_json = "1.0.135"
serde_yaml = { version = "0.9.34+deprecated" }
tokio = "1.38.0"
tokio = "1.43.0"

[workspace.lints.clippy]
all = "deny"
Expand Down
14 changes: 7 additions & 7 deletions clients/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@
name = "arma3-wiki"
description = "A project to store data about Arma 3 commands in a useable format"
license = "MIT"
version = "0.3.3"
version = "0.4.0"
edition = "2021"

[lints]
workspace = true

[dependencies]
directories = "5.0.1"
regex = "1.10.6"
directories = "6.0.0"
regex = "1.11.1"
serde = { workspace = true, features = ["derive"] }
serde_yaml = { workspace = true }

# Local
rust-embed = {version = "8.4.0", features = ["interpolate-folder-path"] }
rust-embed = { version = "8.4.0", features = ["interpolate-folder-path"] }

# Remote
git2 = { version = "0.19.0", optional = true }
git2 = { version = "0.20.0", optional = true }

[features]
default = ["remote"]
remote = ["git2"]
wiki = []

[build-dependencies]
directories = "5.0.1"
directories = "6.0.0"
fs_extra = { version = "1.3.0" }
git2 = { version = "0.19.0" }
git2 = { version = "0.20.0" }
rand = "0.8.5"
2 changes: 1 addition & 1 deletion clients/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl Wiki {
if path.starts_with("commands/")
&& std::path::Path::new(path)
.extension()
.map_or(false, |ext| ext.eq_ignore_ascii_case("yml"))
.is_some_and(|ext| ext.eq_ignore_ascii_case("yml"))
{
let command: Command = serde_yaml::from_str(
std::str::from_utf8(Asset::get(path).unwrap().data.as_ref()).unwrap(),
Expand Down
8 changes: 6 additions & 2 deletions clients/rust/src/model/event_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl ParsedEventHandler {
let version = Version::from_wiki(
parts
.get(5)
.ok_or(format!("Missing param since: {source}"))?
.ok_or_else(|| format!("Missing param since: {source}"))?
.trim_end_matches('}'),
)?;
let since = Some({
Expand Down Expand Up @@ -301,7 +301,11 @@ impl EventHandlerNamespace {
#[must_use]
pub fn by_command(command: &str) -> Vec<Self> {
Self::iter()
.filter(|ns| ns.commands().iter().any(|c| c.to_lowercase() == command.to_lowercase()))
.filter(|ns| {
ns.commands()
.iter()
.any(|c| c.to_lowercase() == command.to_lowercase())
})
.copied()
.collect()
}
Expand Down
10 changes: 5 additions & 5 deletions clients/rust/src/model/param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Param {
let optional = desc.contains("(Optional")
|| (desc.is_empty()
&& value
.split_once("\n")
.split_once('\n')
.unwrap_or_default()
.0
.contains("(Optional"));
Expand Down Expand Up @@ -251,9 +251,9 @@ mod tests {
* {{hl|"FLY"}} - if vehicle is capable of flying and has crew, it will be made airborne at default height.
If ''special'' is "" or not specified, default {{hl|"NONE"}} is used."#).unwrap();
assert_eq!(special.name(), "special");
assert_eq!(special.optional(), true);
assert!(special.optional());

let (sound, _) = Param::from_wiki("say3D", r#"sound: [[String]] or [[Array]]
let (sound, _) = Param::from_wiki("say3D", r"sound: [[String]] or [[Array]]
* [[String]] - classname of the sound to be played. Defined in [[CfgSounds]] including [[Description.ext]]
* [[Array]] format [sound, maxDistance, pitch, isSpeech, offset, simulateSpeedOfSound] where:
** sound: [[String]] - classname of the sound to be played. Defined in [[Description.ext#CfgSounds|CfgSounds]] including [[Description.ext]]
Expand All @@ -264,8 +264,8 @@ If ''special'' is "" or not specified, default {{hl|"NONE"}} is used."#).unwrap(
*** 1/[[true]] = play as speech ([[fadeSpeech]] applies), filters are not applied to it (i.e. house or vehicle interior one)
*** 2 = play as sound ([[fadeSound]] applies) without interior/vehicle muffling
** {{GVI|arma3|2.00|size= 0.75}} offset: [[Number]] - (Optional, default 0) offset in seconds; ignored when ''simulateSpeedOfSound'' is used
** {{GVI|arma3|2.18|size= 0.75}} simulateSpeedOfSound: [[Boolean]] - (Optional, default [[false]]) [[true]] to simulate speed of sound (see description note)"#).unwrap();
** {{GVI|arma3|2.18|size= 0.75}} simulateSpeedOfSound: [[Boolean]] - (Optional, default [[false]]) [[true]] to simulate speed of sound (see description note)").unwrap();
assert_eq!(sound.name(), "sound");
assert_eq!(sound.optional(), false);
assert!(!sound.optional());
}
}

0 comments on commit 90c5e69

Please sign in to comment.