Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Comment update.
  • Loading branch information
realbigsean committed Sep 25, 2020
commit 4d5e542b39008678d07df9cf1e4cd670d92ce179
5 changes: 2 additions & 3 deletions src/mnemonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,9 @@ impl Mnemonic {
}

/// Consume the `Mnemonic` and return the phrase as a `String`.
///
/// This operation creates an empty string and swaps values with the mnemonic's phrase. This
/// allows `Mnemonic` to implement `Drop`, while still returning the phrase.
pub fn into_phrase(mut self) -> String {
// Create an empty string and swap values with the mnemonic's phrase.
// This allows `Mnemonic` to implement `Drop`, while still returning the phrase.
let mut phrase = String::new();
mem::swap(&mut self.phrase, &mut phrase);
phrase
Expand Down