apple / apple/swift-distributed-actors

Cleanup: avoid multiple `!` in MembershipDSL

Open
#490 0 comments 0 reactions 0 assignees View on GitHub
1 - triaged follow-up help wanted size/S
Dominant language
Swift
Stars
679
Forks
84
PR merge metrics
No merged PRs in 30d

Description

Today we do:

`return (.uniqueNode(nodeById(id: v.first!)), VersionVector.Version(v.dropFirst().first!)!)`

try to avoid all those `!!!`

See https://github.com/apple/swift-distributed-actors/pull/438/files#diff-5cf4273f0ced27d0d56e61de001ccbf5R85

Contributor guide

Open the contributing guide

Research direction

Start with the MembershipDSL expression shown in the issue and inspect the referenced pull request diff to locate its file and surrounding code. Replace the chained force unwraps with safer handling while preserving the returned node and version values; done means the expression no longer contains the reported repeated `!` usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
distributed-systems
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.