@@ -37,7 +37,7 @@ impl MyProfile {
37
37
prev_list_name : & str ,
38
38
new_list_name : & str ,
39
39
) -> Result < & MyProfile , Errors > {
40
- let id_hash = if let Some ( id) = Self :: get_id_hash ( & self , prev_list_name) . await {
40
+ let id_hash = if let Some ( id) = Self :: get_id_hash ( & self , prev_list_name) {
41
41
id
42
42
} else {
43
43
return Err ( Errors :: ApiError ( "Provided name doesn't found" . into ( ) ) ) ;
@@ -59,7 +59,7 @@ impl MyProfile {
59
59
}
60
60
61
61
pub async fn set_public ( & self , list_name : & str ) -> Result < & MyProfile , Errors > {
62
- let id_hash = if let Some ( id) = Self :: get_id_hash ( & self , list_name) . await {
62
+ let id_hash = if let Some ( id) = Self :: get_id_hash ( & self , list_name) {
63
63
id
64
64
} else {
65
65
return Err ( Errors :: ApiError (
@@ -83,7 +83,7 @@ impl MyProfile {
83
83
}
84
84
85
85
pub async fn set_private ( & self , list_name : & str ) -> Result < & MyProfile , Errors > {
86
- let id_hash = if let Some ( id) = Self :: get_id_hash ( & self , list_name) . await {
86
+ let id_hash = if let Some ( id) = Self :: get_id_hash ( & self , list_name) {
87
87
id
88
88
} else {
89
89
return Err ( Errors :: ApiError (
@@ -107,7 +107,7 @@ impl MyProfile {
107
107
}
108
108
109
109
pub async fn get_share_url ( & self , list_name : & str ) -> Result < String , Errors > {
110
- let id_hash = if let Some ( id) = Self :: get_id_hash ( & self , list_name) . await {
110
+ let id_hash = if let Some ( id) = Self :: get_id_hash ( & self , list_name) {
111
111
id
112
112
} else {
113
113
return Err ( Errors :: ApiError (
@@ -119,7 +119,7 @@ impl MyProfile {
119
119
}
120
120
121
121
pub async fn delete_list ( & self , list_name : & str ) -> Result < & MyProfile , Errors > {
122
- let id_hash = if let Some ( id) = Self :: get_id_hash ( & self , list_name) . await {
122
+ let id_hash = if let Some ( id) = Self :: get_id_hash ( & self , list_name) {
123
123
id
124
124
} else {
125
125
return Err ( Errors :: ApiError (
@@ -135,7 +135,7 @@ impl MyProfile {
135
135
Ok ( self )
136
136
}
137
137
138
- async fn get_id_hash ( & self , list_name : & str ) -> Option < ( String , bool ) > {
138
+ fn get_id_hash ( & self , list_name : & str ) -> Option < ( String , bool ) > {
139
139
for favourite in & self . fav_lists . data . favoritesLists . allFavorites {
140
140
if favourite. name == list_name. to_string ( ) {
141
141
return Some ( ( favourite. idHash . clone ( ) , favourite. isPublicFavorite . clone ( ) ) ) ;
0 commit comments