Skip to content

Make DiffableDataSourceSnapshot struct#3

Merged
ra1028 merged 1 commit intora1028:masterfrom
kishikawakatsumi:class-to-struct
Sep 2, 2019
Merged

Make DiffableDataSourceSnapshot struct#3
ra1028 merged 1 commit intora1028:masterfrom
kishikawakatsumi:class-to-struct

Conversation

@kishikawakatsumi
Copy link
Copy Markdown
Contributor

In the latest Xcode 11 (beta 6), DiffableDataSourceSnapshot class changed to a struct.
This PR adopt the API to the latest UIKit's API.

Checklist

  • All tests are passed.
  • Added tests.
  • Documented the code using Xcode markup.
  • Searched existing pull requests for ensure not duplicated.

Description

Motivation and Context

If we can write let snapshot as before, we can't copy and paste as it is when we migrate to the iOS 13 standard API in the future. Because of let snapshot almost causes compilation error on in Cocoa's API.

Impact on Existing Code

In most cases let snapshot is now a compilation error. Users should rewrite it to var snapshot.

In the latest Xcode 11 (beta 6), DiffableDataSourceSnapshot class changed to a struct.
This PR adopt the API to the latest UIKit's API.
@ra1028
Copy link
Copy Markdown
Owner

ra1028 commented Sep 2, 2019

Great catch up @kishikawakatsumi !
Thanks 👍

@ra1028 ra1028 merged commit ea762ad into ra1028:master Sep 2, 2019
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