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

Getter methods for OpenConnectionArguments #147

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

eglimi
Copy link
Contributor

@eglimi eglimi commented Oct 13, 2024

The getter methods have a get_ prefix, unlike what is suggested by the Rust API guidelines. The reason is that the names without get_ is already used by setter methods.

An alternative would be to make the fields public. This might be a better option in this case, because the fields can be changed by setters already anyway.

To make it consistent, it also adds a scheme(...) setter.

Copy link

codecov bot commented Oct 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.49%. Comparing base (17bbb19) to head (eaaa469).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
+ Coverage   86.14%   86.49%   +0.35%     
==========================================
  Files          40       40              
  Lines        6560     6619      +59     
==========================================
+ Hits         5651     5725      +74     
+ Misses        909      894      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

amqprs/src/api/connection.rs Outdated Show resolved Hide resolved
The getters use a `get_` prefix, even though this is discouraged by the
naming conventions (see Rust API guidelines). The reason is that setters
are already present with the same name.
@gftea
Copy link
Owner

gftea commented Oct 14, 2024

@eglimi , thanks for contribution, merged

@gftea gftea merged commit 3497a03 into gftea:main Oct 14, 2024
13 checks passed
gftea pushed a commit that referenced this pull request Oct 14, 2024
* Add getter methods to OpenConnectionArguments. Closes #146

The getters use a `get_` prefix, even though this is discouraged by the
naming conventions (see Rust API guidelines). The reason is that setters
are already present with the same name.

* Add tests for OpenConnectionArguments getters.
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