Skip to content
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

Cleanup: use existing local variable #48

Merged
merged 1 commit into from
Sep 28, 2015
Merged

Conversation

yas375
Copy link
Contributor

@yas375 yas375 commented Sep 27, 2015

I didn't run unit tests because Carthage installation fails on 10.11 using brew. But the change is straightforward and shouldn't cause any problems.

@@ -179,7 +179,7 @@ class LazyXMLParser: NSObject, SimpleXmlParser, NSXMLParserDelegate {
current.text = ""
}

parentStack.top().text! += string
current.text += string
Copy link
Owner

Choose a reason for hiding this comment

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

Should be current.text! += string instead of current.text += string.

SWXMLHash/Source/SWXMLHash.swift:182:22: binary operator '+=' cannot be applied to operands of type 'String?' and 'String'

        current.text += string
                     ^

@drmohundro
Copy link
Owner

See my comments. Also, it would be a good idea to change line 244 to use current.text! as well for consistency.

@drmohundro drmohundro changed the title Cleanup: use existent local variable Cleanup: use existing local variable Sep 28, 2015
@yas375
Copy link
Contributor Author

yas375 commented Sep 28, 2015

@drmohundro thanks for the feedback! Done :)

drmohundro added a commit that referenced this pull request Sep 28, 2015
Cleanup: use existing local variable
@drmohundro drmohundro merged commit 37693e8 into drmohundro:master Sep 28, 2015
@drmohundro
Copy link
Owner

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants