@@ -648,17 +648,14 @@ impl EventBuilder {
648648 /// Comment
649649 ///
650650 /// <https://github.com/nostr-protocol/nips/blob/master/22.md>
651- pub fn comment < S > (
652- content : S ,
653- comment_to : CommentTarget < ' _ > ,
654- root : Option < CommentTarget < ' _ > > ,
655- ) -> Self
651+ pub fn comment < ' a , S , T > ( content : S , comment_to : T , root : Option < T > ) -> Self
656652 where
653+ T : Into < CommentTarget < ' a > > ,
657654 S : Into < String > ,
658655 {
659656 Self :: new ( Kind :: Comment , content)
660- . tags ( root. map ( |c| c. as_vec ( true ) ) . unwrap_or_default ( ) )
661- . tags ( comment_to. as_vec ( false ) )
657+ . tags ( root. map ( |c| c. into ( ) . as_vec ( true ) ) . unwrap_or_default ( ) )
658+ . tags ( comment_to. into ( ) . as_vec ( false ) )
662659 }
663660
664661 /// Long-form text note (generally referred to as "articles" or "blog posts").
@@ -828,17 +825,14 @@ impl EventBuilder {
828825 ///
829826 /// [NIP-92]: https://github.com/nostr-protocol/nips/blob/master/92.md
830827 #[ inline]
831- pub fn voice_message_reply < T > (
832- voice_url : T ,
833- root : Option < CommentTarget < ' _ > > ,
834- parent : CommentTarget < ' _ > ,
835- ) -> Self
828+ pub fn voice_message_reply < ' a , T , U > ( voice_url : U , root : Option < T > , parent : T ) -> Self
836829 where
837- T : Into < Url > ,
830+ T : Into < CommentTarget < ' a > > ,
831+ U : Into < Url > ,
838832 {
839833 EventBuilder :: new ( Kind :: VoiceMessageReply , voice_url. into ( ) . as_str ( ) )
840- . tags ( root. map ( |c| c. as_vec ( true ) ) . unwrap_or_default ( ) )
841- . tags ( parent. as_vec ( false ) )
834+ . tags ( root. map ( |c| c. into ( ) . as_vec ( true ) ) . unwrap_or_default ( ) )
835+ . tags ( parent. into ( ) . as_vec ( false ) )
842836 }
843837
844838 /// Add reaction (like/upvote, dislike/downvote or emoji) to an event
0 commit comments