Skip to content

Commit 3ce7225

Browse files
committed
Improve docs on UncheckedHrpstring::witness_version
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`.
1 parent 091187e commit 3ce7225

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/primitives/decode.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ impl<'s> UncheckedHrpstring<'s> {
196196
/// Attempts to convert the first character of the data part to a witness version. If this
197197
/// succeeds, and it is a valid version (0..16 inclusive) we return it, otherwise `None`.
198198
///
199+
/// Future calls to [`Self::data_part_ascii`] will still include the witness version, use
200+
/// [`Self::remove_witness_version`] to remove it.
201+
///
199202
/// This function makes no guarantees on the validity of the checksum.
200203
///
201204
/// # Examples

0 commit comments

Comments
 (0)