We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f5200d commit 718ebfdCopy full SHA for 718ebfd
aw-client-rust/src/lib.rs
@@ -28,15 +28,15 @@ pub struct AwClient {
28
29
impl AwClient {
30
pub fn new(ip: &str, port: &str, name: &str) -> AwClient {
31
- let baseurl = String::from(format!("http://{}:{}", ip, port));
+ let baseurl = format!("http://{}:{}", ip, port);
32
let client = reqwest::blocking::Client::new();
33
let hostname = gethostname::gethostname().into_string().unwrap();
34
- return AwClient {
35
- client: client,
36
- baseurl: baseurl,
+ AwClient {
+ client,
+ baseurl,
37
name: name.to_string(),
38
- hostname: hostname,
39
- };
+ hostname,
+ }
40
}
41
42
pub fn get_bucket(&self, bucketname: &str) -> Result<Bucket, reqwest::Error> {
0 commit comments