Skip to content

Commit

Permalink
Improve docs on UncheckedHrpstring::witness_version
Browse files Browse the repository at this point in the history
The `witness_version` function does not remove the witness version;
improve the documentation on `UncheckedHrpstring::witness_version` to
mention this and point devs towards
`UncheckedHrpstring::remove_witness_version`.
  • Loading branch information
tcharding committed Jan 28, 2024
1 parent 091187e commit 3ce7225
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/primitives/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ impl<'s> UncheckedHrpstring<'s> {
/// Attempts to convert the first character of the data part to a witness version. If this
/// succeeds, and it is a valid version (0..16 inclusive) we return it, otherwise `None`.
///
/// Future calls to [`Self::data_part_ascii`] will still include the witness version, use
/// [`Self::remove_witness_version`] to remove it.
///
/// This function makes no guarantees on the validity of the checksum.
///
/// # Examples
Expand Down

0 comments on commit 3ce7225

Please sign in to comment.