4
0
Benjamin Sago 4 жил өмнө
parent
commit
ccb06d76fe

+ 1 - 1
dns-transport/src/https.rs

@@ -85,7 +85,7 @@ impl Transport for HttpsTransport {
         let body = &buf[index .. read_len];
 
         if response.code != Some(200) {
-            let reason = response.reason.map(|e| e.to_string());
+            let reason = response.reason.map(str::to_owned);
             return Err(Error::WrongHttpStatus(response.code.unwrap(), reason));
         }
 

+ 1 - 1
src/output.rs

@@ -257,7 +257,7 @@ impl TextFormat {
             }
             Record::TXT(ref txt) => {
                 let messages = txt.messages.iter().map(|t| format!("{:?}", t)).collect::<Vec<_>>();
-                format!("{}", messages.join(", "))
+                messages.join(", ")
             }
             Record::Other { ref bytes, .. } => {
                 format!("{:?}", bytes)