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

fix: use std::result::Result instead of Result in handlebar_helper!() macro #578

Merged
merged 1 commit into from May 10, 2023

Conversation

meuter
Copy link

@meuter meuter commented May 10, 2023

It is often customary to define a crate wide Error and Result type. Something like:

type Error = ...
type Result<T> = std::result::Result<T, Error>

If such Result<T> type is in scope when calling the handlebar_helper!() macro, compilation fails as the number of template argument does not match.

This commit modified macro to rely explicitely on std::result::Result<> instead of the whatever Result type is in scope when the macro is invoked.

… macro

It is often customary to define crate wide Error and Result type.
Something like:

type Error = ...
type Result<T> = std::result::Result<T, Error>

If such Result<T> type is in scope when calling the handlebar_helper!()
macro, compilation fails as the number of template argument is not the
same.

This commit modified macro to rely explicitely on std::result::Result<>
instead of the whatever Result type is in scope when the macro is
invoked.
@coveralls
Copy link

Coverage Status

Coverage: 80.613% (+0.2%) from 80.376% when pulling edcbc92 on meuter:master into 27a9a9a on sunng87:master.

@sunng87 sunng87 merged commit 91abf43 into sunng87:master May 10, 2023
9 checks passed
@sunng87
Copy link
Owner

sunng87 commented May 10, 2023

Thank you!

sunng87 added a commit that referenced this pull request May 10, 2023
fix: use std::result::Result instead of Result in handlebar_helper!() macro
@meuter
Copy link
Author

meuter commented May 10, 2023

Oh that was quick, thank you :-)

crapStone added a commit to Calciumdibromid/CaBr2 that referenced this pull request Jun 12, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [handlebars](https://github.com/sunng87/handlebars-rust) | dependencies | patch | `4.3.6` -> `4.3.7` |

---

### Release Notes

<details>
<summary>sunng87/handlebars-rust</summary>

### [`v4.3.7`](https://github.com/sunng87/handlebars-rust/releases/tag/v4.3.7)

[Compare Source](sunng87/handlebars-rust@v4.3.6...v4.3.7)

-   \[Fixed] Use fully qualified name of `Result` in `handlebars_helper` macro \[[#&#8203;578](sunng87/handlebars-rust#578)]
-   \[Fixed] Allow single-quote JSON literal \[[#&#8203;577](sunng87/handlebars-rust#577)]

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45Ni4yIiwidXBkYXRlZEluVmVyIjoiMzUuOTYuMiIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AifQ==-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Co-authored-by: crapStone <crapstone01@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1894
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
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.

None yet

4 participants