Repository navigation
Formart soruce - #12
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes Sendable protocol conformance from several model-layer value types and applies a set of formatting/import-order cleanups across the app’s weather data and UI layers.
Changes:
- Removed
Sendableconformance from multiple structs/enums used by AMEDAS/JMA/area hierarchy and the view model. - Reformatted parts of
JMAService(function signatures, brace placement) and adjusted some indentation/whitespace. - Standardized some import ordering and minor style tweaks in UI/model files.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| TenkiMap/WeatherMapViewModel.swift | Removes Sendable from MapMode, minor whitespace tweak, and closure parameter style change. |
| TenkiMap/WeatherItem.swift | Reorders imports, removes Sendable from WeatherSource/WeatherItem, and applies small style formatting changes. |
| TenkiMap/JMAService.swift | Removes Sendable from JMA model types and reformats several parsing/helpers and initializer formatting. |
| TenkiMap/ContentView.swift | Adjusts import ordering. |
| TenkiMap/AreaHierarchyService.swift | Removes Sendable from Municipality. |
| TenkiMap/AMEDASService.swift | Removes Sendable from AMEDAS model types (including nested enum). |
Comments suppressed due to low confidence (1)
TenkiMap/JMAService.swift:8
JMAOfficeis captured intowithTaskGroup { group.addTask { ... } }infetchForecasts.addTaskclosures are@Sendable, so the captured values should beSendable. RemovingSendablefromJMAOfficewill trigger sendability diagnostics (and can become an error under stricter concurrency settings). Consider restoringSendableconformance forJMAOffice(or explicitly using@unchecked Sendablewith justification) to keep the task-group code concurrency-safe.
struct JMAOffice {
let code: String
let name: String
let latitude: Double
let longitude: Double
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request primarily removes the
Sendableprotocol conformance from several data structures across the codebase, likely to simplify the model layer or address concurrency-related concerns. Additionally, there are minor code style and import order improvements for consistency and readability.Type Model Updates:
Sendableconformance from core data structures such asAMEDASStation,AMEDASObservation,Municipality,JMAOffice,WeatherSource,WeatherItem, and related nested types and enums across files likeAMEDASService.swift,AreaHierarchyService.swift,JMAService.swift,WeatherItem.swift, andWeatherMapViewModel.swift. [1] [2] [3] [4] [5] [6] [7] [8] [9]Code Style and Formatting:
JMAService.swiftto improve readability. [1] [2] [3] [4] [5] [6] [7]WeatherItem.swiftby expanding thetemperatureColorcomputed property to use a multi-line format.ContentView.swift,WeatherItem.swift, andJMAService.swiftfor consistency. [1] [2] [3]Minor Logic/Consistency Fixes:
WeatherMapViewModel.swiftfor clarity.WeatherMapViewModel.swift'sbuildAMEDASItemsmethod.