Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Fix compiler warning #34

Merged
merged 2 commits into from
Jan 27, 2018
Merged

Fix compiler warning #34

merged 2 commits into from
Jan 27, 2018

Conversation

slashmili
Copy link
Contributor

Elixir compiler complains about this line :

warning: an expression is always required on the right side of ->. Please provide a value after ->
  lib/hulaaki/client.ex:179

Elixir compiler complains about this line
@suvash
Copy link
Owner

suvash commented Jan 18, 2018

Hi there. Thanks for this patch. Can you perhaps, add a test for this change ?

@slashmili
Copy link
Contributor Author

slashmili commented Jan 18, 2018 via email

@slashmili
Copy link
Contributor Author

slashmili commented Jan 18, 2018 via email

@suvash
Copy link
Owner

suvash commented Jan 26, 2018

I'm not so sure about the :noop strategy here. I'd rather raise an NotSupported exception, so it blows up. Let me think about this a bit.

@slashmili
Copy link
Contributor Author

@suvash the reason I pushed this PR is because elixir 1.6 gives warning for this line.

I recommend to merge this and think about this later since there is nothing new added to the code . Specially that it has test case now!

BTW if I want to raise exception on that place, I would bump the MAJOR version to avoid breaking users application that are using this library. Unless you know this branch of code never gets executed.

@suvash
Copy link
Owner

suvash commented Jan 27, 2018

Fair enough. I'll have that done in the next major release.

@suvash suvash merged commit f709812 into suvash:master Jan 27, 2018
SampleClient.connect(pid2, options)

options = [topic: "awesome", message: "a message",
dup: 0, qos: 1, retain: 2]
Copy link
Owner

@suvash suvash Feb 6, 2018

Choose a reason for hiding this comment

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

I just realised that this was a bad test (it's def. not setting qos != 1 here). My bad that I let this through, will get rid of this in a future commit.

@slashmili slashmili deleted the fix-compiler-warning branch February 6, 2018 16:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants