Skip to content

Commit 2562519

Browse files
committed
fix(rust): Fix doc test
1 parent 1ab9e14 commit 2562519

File tree

1 file changed

+5
-2
lines changed
  • rust/catalyst-types/src/id_uri

1 file changed

+5
-2
lines changed

rust/catalyst-types/src/id_uri/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,12 @@ impl IdUri {
210210
/// use catalyst_types::id_uri::IdUri;
211211
/// use chrono::Utc;
212212
///
213-
/// let id_uri = IdUri::default();
213+
/// let id_uri = "id.catalyst://cardano/FftxFnOrj2qmTuB2oZG2v0YEWJfKvQ9Gg8AgNAhDsKE"
214+
/// .parse::<IdUri>()
215+
/// .unwrap();
216+
/// assert!(id_uri.nonce().is_none());
214217
/// let id_uri_with_nonce = id_uri.with_nonce();
215-
/// assert!(id_uri_with_nonce.nonce.is_some());
218+
/// assert!(id_uri_with_nonce.nonce().is_some());
216219
/// ```
217220
#[must_use]
218221
pub fn with_nonce(self) -> Self {

0 commit comments

Comments
 (0)