diff --git a/src/client.rs b/src/client.rs
index 7952433..0c93fe3 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -182,8 +182,8 @@ fn request(method: &'static Method, path: String, redirect: bool, quarantine: bo
};
// Check if multi sub requested. If so, replace "Android" with a tricky word.
- if path.contains("+") {
- user_agent = user_agent.replace("Android", "Andr​oid");
+ if path.contains('+') {
+ user_agent = user_agent.replace("Android", "Andr\u{200B}oid");
}
// Build request to Reddit. When making a GET, request gzip compression.
diff --git a/src/duplicates.rs b/src/duplicates.rs
index d92e8ab..5a7653e 100644
--- a/src/duplicates.rs
+++ b/src/duplicates.rs
@@ -151,7 +151,7 @@ pub async fn item(req: Request
) -> Result, String> {
}
if have_after {
- before = "t3_".to_owned();
+ "t3_".clone_into(&mut before);
before.push_str(&duplicates[0].id);
}
@@ -161,7 +161,7 @@ pub async fn item(req: Request) -> Result, String> {
if have_before {
// The next batch will need to start from one after the
// last post in the current batch.
- after = "t3_".to_owned();
+ "t3_".clone_into(&mut after);
after.push_str(&duplicates[l - 1].id);
// Here is where things get terrible. Notice that we
@@ -182,7 +182,7 @@ pub async fn item(req: Request) -> Result, String> {
match json(new_path, true).await {
Ok(response) => {
if !response[1]["data"]["children"].as_array().unwrap_or(&Vec::new()).is_empty() {
- before = "t3_".to_owned();
+ "t3_".clone_into(&mut before);
before.push_str(&duplicates[0].id);
}
}
diff --git a/src/server.rs b/src/server.rs
index c7bf45a..020f780 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -1,3 +1,5 @@
+#![allow(dead_code)]
+
use brotli::enc::{BrotliCompress, BrotliEncoderParams};
use cached::proc_macro::cached;
use cookie::Cookie;