Skip to content
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

Remove unnecessary mut #2219

Merged
merged 3 commits into from
Mar 24, 2025
Merged

Remove unnecessary mut #2219

merged 3 commits into from
Mar 24, 2025

Conversation

dakaizou
Copy link
Contributor

Motivation

Since HealthReporter is already using RwLock:

statuses: Arc<RwLock<HashMap<String, StatusPair>>>,

we can remove mutable reference here:

pub async fn set_service_status<S>(&mut self, service_name: S, status: ServingStatus)

Or if we want to keep this interface, we can remove the RwLock.

Solution

Not using mutable reference.

@tottoto tottoto enabled auto-merge March 24, 2025 13:39
@tottoto tottoto added this pull request to the merge queue Mar 24, 2025
Merged via the queue into hyperium:master with commit e1fe87c Mar 24, 2025
18 checks passed
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.

2 participants