Skip to content

SWIFT-142 Remove dictionary init for document #89

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

Merged
merged 2 commits into from
Jul 9, 2018
Merged

Conversation

kmahar
Copy link
Contributor

@kmahar kmahar commented Jul 8, 2018

this removes the non-literal dictionary init, as well as our single usage of it in the tests.

@kmahar kmahar changed the title emove dictionary init for document SWIFT-142 Remove dictionary init for document Jul 8, 2018
@kmahar kmahar requested review from jmikola and mbroadst July 8, 2018 18:19
@@ -21,7 +21,7 @@ final class CodecTests: XCTestCase {
}

func testEncodeListDatabasesOptions() throws {
let options = ListDatabasesOptions(filter: Document(["a": 10]), nameOnly: true, session: ClientSession())
let options = ListDatabasesOptions(filter: ["a": 10], nameOnly: true, session: ClientSession())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, you don't even need an as!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, since the filter param is always a Document the compiler infers it 😀

Copy link
Member

@mbroadst mbroadst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kmahar kmahar merged commit 40c195f into master Jul 9, 2018
@kmahar kmahar deleted the remove-init branch July 9, 2018 15:35
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.

3 participants