Skip to content

Commit

Permalink
feat: replace reduntant closure for method call
Browse files Browse the repository at this point in the history
  • Loading branch information
CosminPerRam committed May 1, 2024
1 parent 78b52c0 commit 50ccac3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/id-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ pub fn extract_game_parts_from_name(game: &str) -> GameNameParsed {
// First split all text on space or dash
.split_inclusive(&[' ', '-'])
// 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
.filter_map(|w| {
if w.starts_with('(') && w.ends_with(')') {
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/protocols/valve/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl ValveProtocol {
let socket = UdpSocket::new(address, &timeout_settings)?;
let retry_count = timeout_settings.as_ref().map_or_else(
|| TimeoutSettings::default().get_retries(),
|t| t.get_retries(),
TimeoutSettings::get_retries,
);

Ok(Self {
Expand Down

0 comments on commit 50ccac3

Please sign in to comment.