File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ pub struct Team {
3939pub struct NewTeam < ' a > {
4040 pub login : & ' a str ,
4141 pub github_id : i32 ,
42- pub name : Option < String > ,
43- pub avatar : Option < String > ,
42+ pub name : Option < & ' a str > ,
43+ pub avatar : Option < & ' a str > ,
4444 pub org_id : i32 ,
4545}
4646
@@ -49,8 +49,8 @@ impl<'a> NewTeam<'a> {
4949 login : & ' a str ,
5050 org_id : i32 ,
5151 github_id : i32 ,
52- name : Option < String > ,
53- avatar : Option < String > ,
52+ name : Option < & ' a str > ,
53+ avatar : Option < & ' a str > ,
5454 ) -> Self {
5555 NewTeam {
5656 login,
@@ -174,8 +174,8 @@ impl Team {
174174 & login. to_lowercase ( ) ,
175175 org_id,
176176 team. id ,
177- team. name ,
178- org. avatar_url ,
177+ team. name . as_deref ( ) ,
178+ org. avatar_url . as_deref ( ) ,
179179 )
180180 . create_or_update ( conn)
181181 . map_err ( Into :: into)
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ pub mod faker {
6868 & format ! ( "github:{org}:{team}" ) ,
6969 next_gh_id ( ) ,
7070 next_gh_id ( ) ,
71- Some ( team. to_string ( ) ) ,
71+ Some ( team) ,
7272 None ,
7373 )
7474 . create_or_update ( conn) ?,
You can’t perform that action at this time.
0 commit comments