@@ -79,13 +79,13 @@ pub async fn handle_expand_threads_link(
7979}
8080
8181fn build_threads_embed_from_html ( parsed_html : & scraper:: Html ) -> Result < Embed , anyhow:: Error > {
82- let threads_title = meta_tag_content ( & parsed_html, "property" , "og:title" ) . unwrap_or_default ( ) ;
83- let threads_url = meta_tag_content ( & parsed_html, "property" , "og:url" ) . unwrap_or_default ( ) ;
82+ let threads_title = meta_tag_content ( parsed_html, "property" , "og:title" ) . unwrap_or_default ( ) ;
83+ let threads_url = meta_tag_content ( parsed_html, "property" , "og:url" ) . unwrap_or_default ( ) ;
8484 let threads_description =
85- meta_tag_content ( & parsed_html, "property" , "og:description" ) . unwrap_or_default ( ) ;
86- let threads_image = meta_tag_content ( & parsed_html, "property" , "og:image" ) . unwrap_or_default ( ) ;
85+ meta_tag_content ( parsed_html, "property" , "og:description" ) . unwrap_or_default ( ) ;
86+ let threads_image = meta_tag_content ( parsed_html, "property" , "og:image" ) . unwrap_or_default ( ) ;
8787 let threads_image_type =
88- meta_tag_content ( & parsed_html, "name" , "twitter:card" ) . unwrap_or_default ( ) ;
88+ meta_tag_content ( parsed_html, "name" , "twitter:card" ) . unwrap_or_default ( ) ;
8989 let image_is_profile_avatar = threads_image_type == "summary" ;
9090
9191 let embed_builder = EmbedBuilder :: new ( )
@@ -113,12 +113,11 @@ fn parse_threads_links(interaction: &InteractionCreate) -> Vec<Url> {
113113
114114 let links_iterator = resolved_command_data
115115 . messages
116- . iter ( )
117- . map ( |( _, m) | m)
116+ . values ( )
118117 . map ( |m| & m. content )
119118 . flat_map ( |content| {
120119 finder
121- . links ( & content)
120+ . links ( content)
122121 . filter ( |l| l. kind ( ) == & LinkKind :: Url )
123122 . filter_map ( |l| Url :: parse ( l. as_str ( ) ) . ok ( ) )
124123 . filter ( |l| {
0 commit comments