@@ -418,8 +418,9 @@ pub struct Address {
418418serde_string_impl ! ( Address , "a Bitcoin address" ) ;
419419
420420impl Address {
421- /// Constructs a pay to (compressed) public key hash address from a public key. This is the
422- /// preferred non-witness type address.
421+ /// Creates a pay to (compressed) public key hash address from a public key.
422+ ///
423+ /// This is the preferred non-witness type address.
423424 #[ inline]
424425 pub fn p2pkh ( pk : & ecdsa:: PublicKey , network : Network ) -> Address {
425426 let mut hash_engine = PubkeyHash :: engine ( ) ;
@@ -431,8 +432,10 @@ impl Address {
431432 }
432433 }
433434
434- /// Creates a pay to script hash P2SH address from a script. This address type was introduced
435- /// with BIP16 and is the popular type to implement multi-sig these days.
435+ /// Creates a pay to script hash P2SH address from a script.
436+ ///
437+ /// This address type was introduced with BIP16 and is the popular type to implement multi-sig
438+ /// these days.
436439 #[ inline]
437440 pub fn p2sh ( script : & script:: Script , network : Network ) -> Result < Address , Error > {
438441 if script. len ( ) > MAX_SCRIPT_ELEMENT_SIZE {
@@ -444,8 +447,9 @@ impl Address {
444447 } )
445448 }
446449
447- /// Creates a witness pay to public key address from a public key. This is the native segwit
448- /// address type for an output redeemable with a single signature.
450+ /// Creates a witness pay to public key address from a public key.
451+ ///
452+ /// This is the native segwit address type for an output redeemable with a single signature.
449453 ///
450454 /// # Errors
451455 /// Will only return an error if an uncompressed public key is provided.
@@ -466,8 +470,9 @@ impl Address {
466470 } )
467471 }
468472
469- /// Creates a pay to script address that embeds a witness pay to public key. This is a segwit
470- /// address type that looks familiar (as p2sh) to legacy clients.
473+ /// Creates a pay to script address that embeds a witness pay to public key.
474+ ///
475+ /// This is a segwit address type that looks familiar (as p2sh) to legacy clients.
471476 ///
472477 /// # Errors
473478 /// Will only return an Error if an uncompressed public key is provided.
@@ -500,8 +505,9 @@ impl Address {
500505 }
501506 }
502507
503- /// Creates a pay to script address that embeds a witness pay to script hash address. This is a
504- /// segwit address type that looks familiar (as p2sh) to legacy clients.
508+ /// Creates a pay to script address that embeds a witness pay to script hash address.
509+ ///
510+ /// This is a segwit address type that looks familiar (as p2sh) to legacy clients.
505511 pub fn p2shwsh ( script : & script:: Script , network : Network ) -> Address {
506512 let ws = script:: Builder :: new ( )
507513 . push_int ( 0 )
0 commit comments