mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
feat: replace reduntant closure for method call
This commit is contained in:
parent
78b52c0d23
commit
50ccac3cc9
2 changed files with 2 additions and 2 deletions
|
|
@ -264,7 +264,7 @@ pub fn extract_game_parts_from_name(game: &str) -> GameNameParsed {
|
||||||
// First split all text on space or dash
|
// First split all text on space or dash
|
||||||
.split_inclusive(&[' ', '-'])
|
.split_inclusive(&[' ', '-'])
|
||||||
// Remove whitespace surrounding words (leave in dash because it is important information)
|
// Remove whitespace surrounding words (leave in dash because it is important information)
|
||||||
.map(|w| w.trim())
|
.map(str::trim)
|
||||||
// If a word is entirely surrounded in brackets move it to optional parts
|
// If a word is entirely surrounded in brackets move it to optional parts
|
||||||
.filter_map(|w| {
|
.filter_map(|w| {
|
||||||
if w.starts_with('(') && w.ends_with(')') {
|
if w.starts_with('(') && w.ends_with(')') {
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ impl ValveProtocol {
|
||||||
let socket = UdpSocket::new(address, &timeout_settings)?;
|
let socket = UdpSocket::new(address, &timeout_settings)?;
|
||||||
let retry_count = timeout_settings.as_ref().map_or_else(
|
let retry_count = timeout_settings.as_ref().map_or_else(
|
||||||
|| TimeoutSettings::default().get_retries(),
|
|| TimeoutSettings::default().get_retries(),
|
||||||
|t| t.get_retries(),
|
TimeoutSettings::get_retries,
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue