File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,11 @@ impl<'a> UbiBuilder<'a> {
193
193
) )
194
194
}
195
195
196
- fn new_forge ( & self , project_name : String , forge_type : & ForgeType ) -> Result < Box < dyn Forge > > {
196
+ fn new_forge (
197
+ & self ,
198
+ project_name : String ,
199
+ forge_type : & ForgeType ,
200
+ ) -> Result < Box < dyn Forge + Send + Sync > > {
197
201
let api_base = self . api_base_url . map ( Url :: parse) . transpose ( ) ?;
198
202
Ok ( match forge_type {
199
203
ForgeType :: GitHub => Box :: new ( GitHub :: new (
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ pub(crate) struct GitHub {
21
21
token : Option < String > ,
22
22
}
23
23
24
+ unsafe impl Send for GitHub { }
25
+ unsafe impl Sync for GitHub { }
26
+
24
27
#[ derive( Debug , Deserialize , Serialize ) ]
25
28
pub ( crate ) struct Release {
26
29
pub ( crate ) assets : Vec < Asset > ,
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ pub(crate) struct GitLab {
18
18
token : Option < String > ,
19
19
}
20
20
21
+ unsafe impl Send for GitLab { }
22
+ unsafe impl Sync for GitLab { }
23
+
21
24
#[ derive( Debug , Deserialize , Serialize ) ]
22
25
struct Release {
23
26
assets : GitLabAssets ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use url::Url;
14
14
/// [`UbiBuilder`](crate::UbiBuilder) struct to create a new `Ubi` instance.
15
15
#[ derive( Debug ) ]
16
16
pub struct Ubi < ' a > {
17
- forge : Box < dyn Forge > ,
17
+ forge : Box < dyn Forge + Send + Sync > ,
18
18
asset_url : Option < Url > ,
19
19
asset_picker : AssetPicker < ' a > ,
20
20
installer : Installer ,
@@ -38,7 +38,7 @@ pub(crate) struct Download {
38
38
impl < ' a > Ubi < ' a > {
39
39
/// Create a new Ubi instance.
40
40
pub ( crate ) fn new (
41
- forge : Box < dyn Forge > ,
41
+ forge : Box < dyn Forge + Send + Sync > ,
42
42
asset_url : Option < Url > ,
43
43
asset_picker : AssetPicker < ' a > ,
44
44
installer : Installer ,
You can’t perform that action at this time.
0 commit comments