-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Severity: 🟠 Major
File: Sources/BushelUtilities/FileManager/FileManagerHandler.swift:33
PR: #126
Issue
Per the coding guidelines, all public types must conform to the Sendable protocol for thread safety. Since FileManagerHandler contains only a @Sendable closure, it is safe to mark as Sendable.
Current Code
public struct FileManagerHandler: FileHandler {
// ...
}Recommended Fix
public struct FileManagerHandler: FileHandler, Sendable {
// ...
}Rationale
- The coding guidelines require all public types to be
Sendable - The struct only contains a
@Sendableclosure, making it inherently thread-safe - Adding
Sendableconformance is a simple, safe change
CodeRabbit Suggestion
In @Sources/BushelUtilities/FileManager/FileManagerHandler.swift around line 33,
Add Sendable conformance to the public FileManagerHandler type: update the
declaration of the struct FileManagerHandler (the type implementing FileHandler
and holding a @Sendable closure) to also adopt Sendable, i.e., append ",
Sendable" to its protocol list so it becomes "public struct FileManagerHandler:
FileHandler, Sendable"; ensure no other changes are required since its stored
property is already a @Sendable closure.
Source: CodeRabbit AI review of PR #126
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request