File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,13 +115,13 @@ impl<'a> Service<'a> {
115115 pub async fn create_collection (
116116 & self ,
117117 label : & str ,
118- alias : & str ,
118+ alias : Option < & str > ,
119119 window_id : Option < WindowIdentifier > ,
120120 ) -> Result < Collection < ' a > , Error > {
121121 let properties = Properties :: for_collection ( label) ;
122122 let ( collection_path, prompt_path) = self
123123 . inner ( )
124- . call_method ( "CreateCollection" , & ( properties, alias) )
124+ . call_method ( "CreateCollection" , & ( properties, alias. unwrap_or_default ( ) ) )
125125 . await
126126 . map_err :: < ServiceError , _ > ( From :: from) ?
127127 . body ( )
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ impl<'a> Service<'a> {
133133 ) -> Result < Collection < ' a > , Error > {
134134 match self . with_alias ( alias) . await {
135135 Ok ( Some ( collection) ) => Ok ( collection) ,
136- Ok ( None ) => self . create_collection ( label, alias, window_id) . await ,
136+ Ok ( None ) => self . create_collection ( label, Some ( alias) , window_id) . await ,
137137 Err ( err) => Err ( err) ,
138138 }
139139 }
@@ -164,7 +164,7 @@ impl<'a> Service<'a> {
164164 pub async fn create_collection (
165165 & self ,
166166 label : & str ,
167- alias : & str ,
167+ alias : Option < & str > ,
168168 window_id : Option < WindowIdentifier > ,
169169 ) -> Result < Collection < ' a > , Error > {
170170 self . inner
@@ -231,11 +231,11 @@ mod tests {
231231 use super :: Service ;
232232
233233 #[ tokio:: test]
234- #[ ignore = "gnome-keyring doesn't support creating custom collections in CI " ]
234+ #[ ignore = "Requires prompting " ]
235235 async fn create_collection ( ) {
236236 let service = Service :: new ( ) . await . unwrap ( ) ;
237237 let collection = service
238- . create_collection ( "somelabel" , "Some Label" , None )
238+ . create_collection ( "somelabel" , None , None )
239239 . await
240240 . unwrap ( ) ;
241241
You can’t perform that action at this time.
0 commit comments