Skip to content

Commit

Permalink
refactor(syntax) ♻️ : use field initialization shorthand
Browse files Browse the repository at this point in the history
In `struct`/`enum` initializations, if the field and variable have the same
name, the field name is redundant and shorthand syntax is applicable.

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] authored Feb 10, 2024
1 parent 4b9bcea commit 6928a55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async fn main() {

let server = Server {
clients: Arc::new(Mutex::new(HashMap::new())),
docker: docker,
docker,
id: 0,
};

Expand Down
2 changes: 1 addition & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl Server {
.expect("Client not found");
let output = Arc::new(Mutex::new(output));
client.io = Some(OutputInputPair {
input: input,
input,
output: Arc::clone(&output),
});
let session_handle = Arc::new(Mutex::new(session_handle.clone()));
Expand Down

0 comments on commit 6928a55

Please sign in to comment.