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

Commit

Permalink
fixing return types in crypto module documentation (#14554)
Browse files Browse the repository at this point in the history
* fixing return types in documentation

* Apply suggestions from code review

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
jtfirek and bkchr authored Jul 14, 2023
1 parent 74ae051 commit 5a7003b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions primitives/core/src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static {
(pair, phrase.to_owned(), seed)
}

/// Returns the KeyPair from the English BIP39 seed `phrase`, or `None` if it's invalid.
/// Returns the KeyPair from the English BIP39 seed `phrase`, or an error if it's invalid.
#[cfg(feature = "std")]
fn from_phrase(
phrase: &str,
Expand Down Expand Up @@ -907,7 +907,7 @@ pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static {
}

/// Make a new key pair from secret seed material. The slice must be the correct size or
/// it will return `None`.
/// an error will be returned.
///
/// @WARNING: THIS WILL ONLY BE SECURE IF THE `seed` IS SECURE. If it can be guessed
/// by an attacker then they can also derive your key.
Expand Down Expand Up @@ -949,8 +949,6 @@ pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static {
/// Notably, integer junction indices may be legally prefixed with arbitrary number of zeros.
/// Similarly an empty password (ending the SURI with `///`) is perfectly valid and will
/// generally be equivalent to no password at all.
///
/// `None` is returned if no matches are found.
#[cfg(feature = "std")]
fn from_string_with_seed(
s: &str,
Expand Down

0 comments on commit 5a7003b

Please sign in to comment.