Skip to content

Commit

Permalink
Merge pull request #47 from sergeant-savage/prod
Browse files Browse the repository at this point in the history
Revert changes made to error handling
  • Loading branch information
mariano-f-r committed Apr 14, 2024
2 parents a404195 + 93520dd commit 8f4b25c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ It is very much a proof of concept, and will likely not receive many, if any upd
- **Deployment:** [Shuttle](https://shuttle.rs/) platform

## 👩‍💻 Contributing
Contributing is always welcome, and any and all pull requests and issues are appreciated.
Contributing is always welcome, and any and all pull requests and issues are appreciated. See our [Contributing document](CONTRIBUTING.md) for more details.

## 📜 License
This software is licenced MIT.
Expand Down
12 changes: 4 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,11 @@ struct CustomService {
#[shuttle_runtime::async_trait]
impl shuttle_runtime::Service for CustomService {
async fn bind(mut self, addr: net::SocketAddr) -> Result<(), shuttle_runtime::Error> {
listen(addr, move |output| {
let user_count_ref = self.user_count.clone(); // Clone only if necessary
ClientHandler {
output,
user_count_ref,
}
listen(addr, |output| ClientHandler {
output,
user_count_ref: self.user_count.clone(),
})
.map_err(|err| shuttle_runtime::Error::from(err))?;

.unwrap();
Ok(())
}
}
Expand Down

0 comments on commit 8f4b25c

Please sign in to comment.