Skip to content

Fix: connection.rs error and improve error handling #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nafisatou
Copy link
Collaborator

What This PR Does

  • Fixes type inference error in connection.rs by adding explicit Result<()> type
  • Replaces manual Err(format!(...)) with anyhow::bail!() for cleaner error handling
  • Removes compiler warnings from unused mut variables
  • Adds doc comments for better code readability

Why
This ensures that the project compiles properly and improves overall code

@@ -1,12 +1,13 @@
[package]
name = "async-chat"
version = "0.1.0"
edition = "2024"
edition = "2021"
Copy link
Collaborator

@bansikah22 bansikah22 Apr 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nafisatou you should use the 2024 and not go back to 2021

Copy link
Collaborator

@Nkwenti-Severian-Ndongtsop Nkwenti-Severian-Ndongtsop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nafisatou please ensure your PR passes all the checks
I can see you have formatting issues.
Always try to run the commands in this workflows manually before requesting a pull, that is

  • cargo fmt --check
  • cargo clippy -- -D warnings
    You can also check the workflow to know what it checks in your code

@micheal-ndoh
Copy link
Collaborator

@nafisatou run the ci-local.sh script to check if your code is well formatted before pushing dr

@Christiantyemele
Copy link
Collaborator

Christiantyemele commented Apr 8, 2025

@nafisatou fix the failing pipeline with cargo fmt --all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants