@@ -66,22 +66,15 @@ pub trait WolframAlphaRequestSender {
66
66
///
67
67
/// Takes a map of parameters which get appended to the request as query
68
68
/// parameters. Returns the response body string.
69
- fn send < ' a > (
70
- & self ,
71
- method : & str ,
72
- params : & mut HashMap < & str , & ' a str >
73
- ) -> HttpRequestResult < String > ;
69
+ fn send < ' a > ( & self , method : & str , params : & mut HashMap < & str , & ' a str > )
70
+ -> HttpRequestResult < String > ;
74
71
75
72
/// Make an API call to Wolfram|Alpha that contains the configured App ID.
76
73
///
77
74
/// Takes a map of parameters which get appended to the request as query
78
75
/// parameters. Returns the response body string.
79
- fn send_authed < ' a > (
80
- & self ,
81
- method : & str ,
82
- app_id : & ' a str ,
83
- params : & mut HashMap < & str , & ' a str >
84
- ) -> HttpRequestResult < String > {
76
+ fn send_authed < ' a > ( & self , method : & str , app_id : & ' a str , params : & mut HashMap < & str , & ' a str > )
77
+ -> HttpRequestResult < String > {
85
78
params. insert ( "appid" , app_id) ;
86
79
self . send ( method, params)
87
80
}
@@ -97,11 +90,8 @@ mod hyper_support {
97
90
use url:: Url ;
98
91
99
92
impl WolframAlphaRequestSender for hyper:: Client {
100
- fn send < ' a > (
101
- & self ,
102
- method : & str ,
103
- params : & mut HashMap < & str , & ' a str >
104
- ) -> HttpRequestResult < String > {
93
+ fn send < ' a > ( & self , method : & str , params : & mut HashMap < & str , & ' a str > )
94
+ -> HttpRequestResult < String > {
105
95
let url_string = format ! ( "https://api.wolframalpha.com/v2/{}" , method) ;
106
96
let mut url = url_string. parse :: < Url > ( ) . expect ( "Unable to parse URL" ) ;
107
97
0 commit comments