Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

fixing return types in crypto module documentation#14554

Merged
paritytech-processbot[bot] merged 2 commits intoparitytech:masterfrom
jtfirek:jacob-crypto-doc-fix
Jul 14, 2023
Merged

fixing return types in crypto module documentation#14554
paritytech-processbot[bot] merged 2 commits intoparitytech:masterfrom
jtfirek:jacob-crypto-doc-fix

Conversation

@jtfirek
Copy link
Contributor

@jtfirek jtfirek commented Jul 11, 2023

Description

I am a student at the PBA and I came across this issue when completing the first assignment as I was reading the rust docs.
It looks a few functions in this file are documented as if they have an Option return type when they are actually returning a Result

  • What does this PR do?
    Fixes the documentation for 3 functions by changing returns a None to returns an Error
  • Why are these changes needed?
    I think the documentation is incorrect
  • How were these changes implemented and what do they affect?
    They will change the rust documentation

@cla-bot-2021
Copy link

cla-bot-2021 bot commented Jul 11, 2023

User @jtfirek, please sign the CLA here.

@jtfirek jtfirek changed the title fixing return types in documentation fixing return types in crypto module documentation Jul 11, 2023
/// generally be equivalent to no password at all.
///
/// `None` is returned if no matches are found.
/// an error is returned if no matches are found.
Copy link
Member

Choose a reason for hiding this comment

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

You can probably just remove this line - there are multiple reasons for an error return and I dont see the need to list them all here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry just now seeing this @ggwpez

@ggwpez ggwpez added A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jul 11, 2023
@ggwpez
Copy link
Member

ggwpez commented Jul 14, 2023

Polkadot companion: At PBA

Why does this need a companion? That line makes the CI fail btw.

@bkchr
Copy link
Member

bkchr commented Jul 14, 2023

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot paritytech-processbot bot merged commit 5a7003b into paritytech:master Jul 14, 2023
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
* fixing return types in documentation

* Apply suggestions from code review

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Ank4n pushed a commit that referenced this pull request Jul 22, 2023
* fixing return types in documentation

* Apply suggestions from code review

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants