Accept str instead of char* in read_autoconf_file

This commit is contained in:
Alexander Krotov
2019-09-07 19:52:12 +03:00
parent 0a6e540394
commit 81cabd08a9
3 changed files with 5 additions and 7 deletions

View File

@@ -663,11 +663,11 @@ pub fn dc_stop_ongoing_process(context: &Context) {
};
}
pub fn read_autoconf_file(context: &Context, url: *const libc::c_char) -> *mut libc::c_char {
info!(context, 0, "Testing {} ...", to_string(url));
pub fn read_autoconf_file(context: &Context, url: &str) -> *mut libc::c_char {
info!(context, 0, "Testing {} ...", url);
match reqwest::Client::new()
.get(as_str(url))
.get(url)
.send()
.and_then(|mut res| res.text())
{