-
Notifications
You must be signed in to change notification settings - Fork 157
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
Added DownloadStatus convenience #454
Conversation
99187e0
to
8e8fd66
Compare
/// Convenience to initialize a `DownloadStatus` when the download state is `.pending` | ||
/// | ||
/// - Parameters: | ||
/// - error: Contains error information in case of failure when state is | ||
/// set to `DownloadState.failed`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is confusing. If this initializer is for use with download state pending, why would you ever provide an error if that's only for the failed state?
Sources/MapboxMaps/Foundation/Extensions/Core/DownloadStatus.swift
Outdated
Show resolved
Hide resolved
Tests/MapboxMapsTests/Foundation/Extensions/Core/DownloadStatusTests.swift
Outdated
Show resolved
Hide resolved
Tests/MapboxMapsTests/Foundation/Extensions/Core/DownloadStatusTests.swift
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pausing my review. I think the test improvements are the most important. Remodeling DownloadStatus as an enum can be deferred, since that seems outside of the scope here (refining an existing construct vs wrapping it in a new one).
Tests/MapboxMapsTests/Foundation/Extensions/Core/DownloadStatusTests.swift
Outdated
Show resolved
Hide resolved
Tests/MapboxMapsTests/Foundation/Extensions/Core/DownloadStatusTests.swift
Outdated
Show resolved
Hide resolved
Tests/MapboxMapsTests/Foundation/Extensions/Core/DownloadStatusTests.swift
Outdated
Show resolved
Hide resolved
Tests/MapboxMapsTests/Foundation/Extensions/Core/DownloadStatusTests.swift
Outdated
Show resolved
Hide resolved
…sTests.swift Co-authored-by: Andrew Hershberger <andrew.hershberger@mapbox.com>
PRs must be submitted under the terms of our Contributor License Agreement CLA.
Fixes: < Link to related issues that will be fixed by this pull request, if they exist >
Pull request checklist:
mapbox-maps-ios
changelog:<changelog></changelog>
.Summary of changes
User impact (optional)