@@ -192,7 +192,6 @@ pub(crate) struct Team {
192192 zulip_groups : Vec < RawZulipGroup > ,
193193 #[ serde( default ) ]
194194 zulip_streams : Vec < RawZulipStream > ,
195- discord_roles : Option < Vec < DiscordRole > > ,
196195}
197196
198197impl Team {
@@ -258,10 +257,6 @@ impl Team {
258257 & self . roles
259258 }
260259
261- pub ( crate ) fn discord_roles ( & self ) -> Option < & Vec < DiscordRole > > {
262- self . discord_roles . as_ref ( )
263- }
264-
265260 /// Exposed only for validation.
266261 pub ( crate ) fn raw_people ( & self ) -> & TeamPeople {
267262 & self . people
@@ -509,15 +504,6 @@ impl Team {
509504 Ok ( result)
510505 }
511506
512- pub ( crate ) fn discord_ids ( & self , data : & Data ) -> Result < Vec < u64 > , Error > {
513- Ok ( self
514- . members ( data) ?
515- . iter ( )
516- . flat_map ( |name| data. person ( name) . map ( |p| p. discord_id ( ) ) )
517- . flatten ( )
518- . collect ( ) )
519- }
520-
521507 pub ( crate ) fn is_alumni_team ( & self ) -> bool {
522508 self . people . include_all_alumni
523509 }
@@ -537,23 +523,6 @@ impl Team {
537523 }
538524}
539525
540- #[ derive( serde_derive:: Deserialize , Debug ) ]
541- #[ serde( rename_all = "kebab-case" , deny_unknown_fields) ]
542- pub ( crate ) struct DiscordRole {
543- name : String ,
544- color : Option < String > ,
545- }
546-
547- impl DiscordRole {
548- pub ( crate ) fn name ( & self ) -> & str {
549- & self . name
550- }
551-
552- pub ( crate ) fn color ( & self ) -> Option < & str > {
553- self . color . as_ref ( ) . map ( |s| & s[ ..] )
554- }
555- }
556-
557526#[ derive( Eq , PartialEq ) ]
558527pub ( crate ) struct GitHubTeam < ' a > {
559528 pub ( crate ) org : & ' a str ,
@@ -639,11 +608,6 @@ pub(crate) struct RfcbotData {
639608 pub ( crate ) exclude_members : Vec < String > ,
640609}
641610
642- pub ( crate ) struct DiscordInvite < ' a > {
643- pub ( crate ) url : & ' a str ,
644- pub ( crate ) channel : & ' a str ,
645- }
646-
647611#[ derive( serde_derive:: Deserialize , Debug ) ]
648612#[ serde( rename_all = "kebab-case" , deny_unknown_fields) ]
649613pub ( crate ) struct WebsiteData {
@@ -652,8 +616,6 @@ pub(crate) struct WebsiteData {
652616 page : Option < String > ,
653617 email : Option < String > ,
654618 repo : Option < String > ,
655- discord_invite : Option < String > ,
656- discord_name : Option < String > ,
657619 matrix_room : Option < String > ,
658620 zulip_stream : Option < String > ,
659621 #[ serde( default ) ]
@@ -685,17 +647,6 @@ impl WebsiteData {
685647 self . repo . as_deref ( )
686648 }
687649
688- pub ( crate ) fn discord ( & self ) -> Option < DiscordInvite < ' _ > > {
689- if let ( Some ( url) , Some ( channel) ) = ( & self . discord_invite , & self . discord_name ) {
690- Some ( DiscordInvite {
691- url : url. as_ref ( ) ,
692- channel : channel. as_ref ( ) ,
693- } )
694- } else {
695- None
696- }
697- }
698-
699650 pub ( crate ) fn zulip_stream ( & self ) -> Option < & str > {
700651 self . zulip_stream . as_deref ( )
701652 }
0 commit comments