mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 07:17:27 +00:00
Maintenance: dep updates and clippy fixs (#243)
* chore(deps): update crc32fast to v1.5 * chore(deps): update ureq to v2.12 * chore(deps): update phf to v0.13 * chore(deps): update clap to v4.5 * chore(deps): update lazy_static to v1.5 * chore(deps): update thiserror to v2.0.16 * chore(deps): update clap to v4.5 * chore(deps): update bson to v2.15 * chore(deps): update base64 to v0.22 * chore(deps): update quick-xml to v0.38 * chore(deps): update webbrowser to v1.0 * chore(clippy): fix a load of "variables can be used directly" * chore(ci): update MSRV toolchain to 1.82.0 * chore(pre-commit): update MSRV to 1.82.0 * chore(README): update Minimum Supported Rust Version to 1.82.0 * chore(VERSIONS): update MSRV to 1.82.0 * chore(cli): bump version to 0.4.0 and update MSRV to 1.82.0 * chore(release): bump version to 0.8.0 and update MSRV to 1.82.0
This commit is contained in:
parent
d6fe78f0e6
commit
080f327ab6
12 changed files with 54 additions and 33 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -128,7 +128,7 @@ jobs:
|
|||
- name: Install MSRV
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.81.0
|
||||
toolchain: 1.82.0
|
||||
override: true
|
||||
- name: Run MSRV
|
||||
run: cargo check -p gamedig
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ repos:
|
|||
language: system
|
||||
files: '([.]rs|Cargo\.toml)$'
|
||||
pass_filenames: false
|
||||
entry: rustup run --install 1.81.0 cargo check -p gamedig
|
||||
entry: rustup run --install 1.82.0 cargo check -p gamedig
|
||||
|
||||
- id: docs
|
||||
name: Check rustdoc compiles
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ on Discord.
|
|||
|
||||
## Usage
|
||||
|
||||
Minimum Supported Rust Version is `1.81.0` and the code is cross-platform.
|
||||
Minimum Supported Rust Version is `1.82.0` and the code is cross-platform.
|
||||
|
||||
Pick a game/service/protocol (check the [GAMES](GAMES.md), [SERVICES](SERVICES.md) and [PROTOCOLS](PROTOCOLS.md) files
|
||||
to see the currently supported ones), provide the ip and the port (be aware that some game servers use a separate port
|
||||
|
|
@ -102,7 +102,7 @@ Want to see more examples? Checkout the [examples](crates/lib/examples) folder.
|
|||
## Command Line Interface
|
||||
|
||||
The library also has an [official CLI](https://crates.io/crates/gamedig_cli) that you can use, it has
|
||||
MSRV of `1.81.0`.
|
||||
MSRV of `1.82.0`.
|
||||
|
||||
## Documentation
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# MSRV (Minimum Supported Rust Version)
|
||||
|
||||
Current: `1.81.0`
|
||||
Current: `1.82.0`
|
||||
|
||||
Places to update:
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,17 @@ Who knows what the future holds...
|
|||
|
||||
Nothing... yet.
|
||||
|
||||
# 0.4.0 - 24/08/2025
|
||||
|
||||
### Breaking Changes:
|
||||
|
||||
- MSRV has been updated to `1.82.0` to match the latest `gamedig` version.
|
||||
|
||||
### Changes:
|
||||
|
||||
- Some minor clippy fixes
|
||||
- Updated dependencies
|
||||
|
||||
# 0.3.0 - 23/04/2025
|
||||
|
||||
### Changes:
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ authors = [
|
|||
]
|
||||
description = "A command line interface for gamedig"
|
||||
license = "MIT"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
edition = "2021"
|
||||
default-run = "gamedig_cli"
|
||||
homepage = "https://gamedig.github.io/"
|
||||
repository = "https://github.com/gamedig/rust-gamedig"
|
||||
readme = "README.md"
|
||||
keywords = ["server", "query", "game", "check", "status"]
|
||||
rust-version = "1.81.0"
|
||||
rust-version = "1.82.0"
|
||||
categories = ["command-line-interface"]
|
||||
|
||||
[features]
|
||||
|
|
@ -31,9 +31,9 @@ browser = ["dep:webbrowser"]
|
|||
|
||||
[dependencies]
|
||||
# Core Dependencies
|
||||
thiserror = "2.0.0"
|
||||
clap = { version = "4.5.4", default-features = false, features = ["derive"] }
|
||||
gamedig = { version = "0.7.0", default-features = false, features = [
|
||||
thiserror = "2.0.16"
|
||||
clap = { version = "4.5", default-features = false, features = ["derive"] }
|
||||
gamedig = { version = "0.8.0", default-features = false, features = [
|
||||
"clap",
|
||||
"games",
|
||||
"game_defs",
|
||||
|
|
@ -44,16 +44,16 @@ gamedig = { version = "0.7.0", default-features = false, features = [
|
|||
serde = { version = "1", optional = true, default-features = false }
|
||||
|
||||
# BSON
|
||||
bson = { version = "2.8.1", optional = true, default-features = false }
|
||||
base64 = { version = "0.22.0", optional = true, default-features = false, features = ["std"] }
|
||||
bson = { version = "2.15", optional = true, default-features = false }
|
||||
base64 = { version = "0.22", optional = true, default-features = false, features = ["std"] }
|
||||
hex = { version = "0.4.3", optional = true, default-features = false }
|
||||
|
||||
# JSON
|
||||
serde_json = { version = "1", optional = true, default-features = false }
|
||||
|
||||
# XML
|
||||
quick-xml = { version = "0.37.0", optional = true, default-features = false }
|
||||
quick-xml = { version = "0.38", optional = true, default-features = false }
|
||||
|
||||
# Browser
|
||||
webbrowser = { version = "1.0.0", optional = true, default-features = false }
|
||||
webbrowser = { version = "1.0", optional = true, default-features = false }
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ fn resolve_ip_or_domain<T: AsRef<str>>(host: T, extra_options: &mut Option<Extra
|
|||
fn resolve_domain(domain: &str) -> Result<IpAddr> {
|
||||
// Append a dummy port to perform socket address resolution and then extract the
|
||||
// IP
|
||||
Ok(format!("{}:0", domain)
|
||||
Ok(format!("{domain}:0")
|
||||
.to_socket_addrs()
|
||||
.map_err(|_| Error::InvalidHostname(domain.to_string()))?
|
||||
.next()
|
||||
|
|
@ -248,7 +248,7 @@ fn output_result<T: CommonResponse + ?Sized>(output_mode: OutputMode, format: Ou
|
|||
/// # Arguments
|
||||
/// * `result` - A result that can be output using the debug formatter.
|
||||
fn output_result_debug<R: std::fmt::Debug>(result: R) {
|
||||
println!("{:#?}", result);
|
||||
println!("{result:#?}");
|
||||
}
|
||||
|
||||
/// Output the result as a JSON object.
|
||||
|
|
@ -374,7 +374,7 @@ fn output_result_xml<T: serde::Serialize>(result: T) -> Result<()> {
|
|||
let xml_bytes = writer.into_inner();
|
||||
let xml_string = String::from_utf8(xml_bytes).expect("Failed to convert XML bytes to UTF-8 string");
|
||||
|
||||
println!("{}", xml_string);
|
||||
println!("{xml_string}");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
@ -446,7 +446,7 @@ fn main() -> Result<()> {
|
|||
output_result(output_mode, format, result.as_ref());
|
||||
}
|
||||
Action::Source => {
|
||||
println!("{}", GAMEDIG_HEADER);
|
||||
println!("{GAMEDIG_HEADER}");
|
||||
|
||||
#[cfg(feature = "browser")]
|
||||
{
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ pub fn test_game_name_rule(
|
|||
.collect()
|
||||
};
|
||||
|
||||
let mut expected_id = format!("{}{}", main, suffix).to_lowercase();
|
||||
let mut expected_id = format!("{main}{suffix}").to_lowercase();
|
||||
|
||||
if let Some(other_game_name_words) = seen_ids.get(&expected_id) {
|
||||
let mut game_names_same = other_game_name_words.len() == game.words.len();
|
||||
|
|
@ -166,7 +166,7 @@ pub fn test_game_name_rule(
|
|||
// and 2017 would be swbf22017).
|
||||
|
||||
rule_stack.push(IDRule::IfIDDuplicateSameGameAppendYearToNewer);
|
||||
expected_id = format!("{}{}", expected_id, year).to_lowercase();
|
||||
expected_id = format!("{expected_id}{year}").to_lowercase();
|
||||
} else if let Some(protocol) = game.optional_parts.first() {
|
||||
// 7. If a game supports multiple protocols, multiple entries will be done for
|
||||
// said game where the edition/protocol name (first disposable in this order)
|
||||
|
|
@ -199,7 +199,7 @@ pub fn test_game_name_rule(
|
|||
.collect::<Vec<_>>()
|
||||
.join("");
|
||||
|
||||
expected_id = format!("{}{}", main, suffix).to_lowercase();
|
||||
expected_id = format!("{main}{suffix}").to_lowercase();
|
||||
}
|
||||
|
||||
// 8. If its actually about a mod that adds the ability for queries to be
|
||||
|
|
@ -368,7 +368,7 @@ pub fn test_game_name_rules<'a, I: Iterator<Item = (&'a str, &'a str)>>(games: I
|
|||
|
||||
if !wrong_ids.is_empty() {
|
||||
for fail in &wrong_ids {
|
||||
println!("{:#?}", fail);
|
||||
println!("{fail:#?}");
|
||||
}
|
||||
let percentage = (wrong_ids.len() * 100) / game_count;
|
||||
println!(
|
||||
|
|
|
|||
|
|
@ -2,6 +2,17 @@ Who knows what the future holds...
|
|||
|
||||
# X.Y.Z - DD/MM/YYYY
|
||||
|
||||
# 0.8.0 24/08/2025
|
||||
|
||||
Breaking:
|
||||
|
||||
- MSRV is now `1.82.0` (was `1.81.0`), this is due to deps we rely on requiring a higher version
|
||||
|
||||
Crate:
|
||||
|
||||
- Some minor clippy fixes
|
||||
- Updated dependencies
|
||||
|
||||
# 0.7.0 - 23/04/2025
|
||||
|
||||
Breaking:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "gamedig"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"rust-GameDig contributors [https://github.com/gamedig/rust-gamedig/contributors]",
|
||||
|
|
@ -13,7 +13,7 @@ documentation = "https://docs.rs/gamedig/latest/gamedig/"
|
|||
repository = "https://github.com/gamedig/rust-gamedig"
|
||||
readme = "README.md"
|
||||
keywords = ["server", "query", "game", "check", "status"]
|
||||
rust-version = "1.81.0"
|
||||
rust-version = "1.82.0"
|
||||
categories = ["parser-implementations", "parsing", "network-programming", "encoding"]
|
||||
|
||||
[features]
|
||||
|
|
@ -40,23 +40,23 @@ tls = ["ureq/tls"]
|
|||
[dependencies]
|
||||
byteorder = "1.5"
|
||||
bzip2-rs = "0.1"
|
||||
crc32fast = "1.4"
|
||||
crc32fast = "1.5"
|
||||
base64 = "0.22.0"
|
||||
|
||||
encoding_rs = "0.8"
|
||||
ureq = { version = "2.9", default-features = false, features = ["gzip", "json"] }
|
||||
ureq = { version = "2.12", default-features = false, features = ["gzip", "json"] }
|
||||
url = "2"
|
||||
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = { version = "1.0" }
|
||||
|
||||
phf = { version = "0.11", optional = true, features = ["macros"] }
|
||||
phf = { version = "0.13", optional = true, features = ["macros"] }
|
||||
|
||||
clap = { version = "4.5.4", optional = true, features = ["derive"] }
|
||||
clap = { version = "4.5", optional = true, features = ["derive"] }
|
||||
|
||||
pcap-file = { version = "2.0", optional = true }
|
||||
pnet_packet = { version = "0.35", optional = true }
|
||||
lazy_static = { version = "1.4", optional = true }
|
||||
lazy_static = { version = "1.5", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
gamedig-id-tests = { path = "../id-tests", default-features = false }
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ impl HttpClient {
|
|||
Host::Ipv4(ip) => SocketAddr::V4(SocketAddrV4::new(ip, port)),
|
||||
Host::Ipv6(ip) => SocketAddr::V6(SocketAddrV6::new(ip, port, 0, 0)),
|
||||
Host::Domain(domain) => {
|
||||
format!("{}:{}", domain, port)
|
||||
format!("{domain}:{port}")
|
||||
.to_socket_addrs()
|
||||
.map_err(|e| HostLookup.context(e))?
|
||||
.next()
|
||||
|
|
|
|||
|
|
@ -76,8 +76,7 @@ impl Unreal2Protocol {
|
|||
|
||||
if packet_type != expected_packet_type {
|
||||
Err(PacketBad.context(format!(
|
||||
"Packet response ({:?}) didn't match request ({:?}) packet type",
|
||||
packet_type, expected_packet_type
|
||||
"Packet response ({packet_type:?}) didn't match request ({expected_packet_type:?}) packet type",
|
||||
)))
|
||||
} else {
|
||||
Ok(())
|
||||
|
|
@ -115,7 +114,7 @@ impl Unreal2Protocol {
|
|||
|
||||
let r = Self::consume_response_headers(&mut buffer, PacketKind::MutatorsAndRules);
|
||||
if r.is_err() {
|
||||
println!("{:?}", r);
|
||||
println!("{r:?}");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue