@@ -15,8 +15,7 @@ pub struct Iap<R: Runtime>(AppHandle<R>);
1515
1616impl < R : Runtime > Iap < R > {
1717 pub fn initialize ( & self ) -> crate :: Result < InitializeResponse > {
18- Err ( crate :: Error :: from ( std:: io:: Error :: new (
19- std:: io:: ErrorKind :: Other ,
18+ Err ( crate :: Error :: from ( std:: io:: Error :: other (
2019 "IAP is not supported on this platform" ,
2120 ) ) )
2221 }
@@ -26,8 +25,7 @@ impl<R: Runtime> Iap<R> {
2625 _product_ids : Vec < String > ,
2726 _product_type : String ,
2827 ) -> crate :: Result < GetProductsResponse > {
29- Err ( crate :: Error :: from ( std:: io:: Error :: new (
30- std:: io:: ErrorKind :: Other ,
28+ Err ( crate :: Error :: from ( std:: io:: Error :: other (
3129 "IAP is not supported on this platform" ,
3230 ) ) )
3331 }
@@ -38,8 +36,7 @@ impl<R: Runtime> Iap<R> {
3836 _product_type : String ,
3937 _offer_token : Option < String > ,
4038 ) -> crate :: Result < Purchase > {
41- Err ( crate :: Error :: from ( std:: io:: Error :: new (
42- std:: io:: ErrorKind :: Other ,
39+ Err ( crate :: Error :: from ( std:: io:: Error :: other (
4340 "IAP is not supported on this platform" ,
4441 ) ) )
4542 }
@@ -48,15 +45,13 @@ impl<R: Runtime> Iap<R> {
4845 & self ,
4946 _product_type : String ,
5047 ) -> crate :: Result < RestorePurchasesResponse > {
51- Err ( crate :: Error :: from ( std:: io:: Error :: new (
52- std:: io:: ErrorKind :: Other ,
48+ Err ( crate :: Error :: from ( std:: io:: Error :: other (
5349 "IAP is not supported on this platform" ,
5450 ) ) )
5551 }
5652
5753 pub fn get_purchase_history ( & self ) -> crate :: Result < GetPurchaseHistoryResponse > {
58- Err ( crate :: Error :: from ( std:: io:: Error :: new (
59- std:: io:: ErrorKind :: Other ,
54+ Err ( crate :: Error :: from ( std:: io:: Error :: other (
6055 "IAP is not supported on this platform" ,
6156 ) ) )
6257 }
@@ -65,8 +60,7 @@ impl<R: Runtime> Iap<R> {
6560 & self ,
6661 _purchase_token : String ,
6762 ) -> crate :: Result < AcknowledgePurchaseResponse > {
68- Err ( crate :: Error :: from ( std:: io:: Error :: new (
69- std:: io:: ErrorKind :: Other ,
63+ Err ( crate :: Error :: from ( std:: io:: Error :: other (
7064 "IAP is not supported on this platform" ,
7165 ) ) )
7266 }
@@ -76,8 +70,7 @@ impl<R: Runtime> Iap<R> {
7670 _product_id : String ,
7771 _product_type : String ,
7872 ) -> crate :: Result < ProductStatus > {
79- Err ( crate :: Error :: from ( std:: io:: Error :: new (
80- std:: io:: ErrorKind :: Other ,
73+ Err ( crate :: Error :: from ( std:: io:: Error :: other (
8174 "IAP is not supported on this platform" ,
8275 ) ) )
8376 }
0 commit comments