git.delta.rocks / jrsonnet / refs/commits / 3fd84331488f

difftreelog

style fix clippy warnings

Yaroslav Bolyukin2022-09-02parent: #b0625df.patch.diff
in: trunk

3 files changed

modifiedcmds/fleet/src/cmds/info.rsdiffbeforeafterboth
--- a/cmds/fleet/src/cmds/info.rs
+++ b/cmds/fleet/src/cmds/info.rs
@@ -38,7 +38,7 @@
 					if !tagged.is_empty() {
 						let tags: Vec<String> = config.config_attr(&host, "tags").await?;
 						for tag in tagged {
-							if !tags.contains(&tag) {
+							if !tags.contains(tag) {
 								continue 'host;
 							}
 						}
modifiedcmds/fleet/src/keys.rsdiffbeforeafterboth
50 .filter(|(_, host)| !host.encryption_key.is_empty())50 .filter(|(_, host)| !host.encryption_key.is_empty())
51 .map(|(n, _)| n)51 .map(|(n, _)| n)
52 {52 {
53 if !host_names.contains(&hostname.to_owned()) {53 if !host_names.contains(hostname) {
54 out.push(hostname.to_owned())54 out.push(hostname.to_owned())
55 }55 }
56 }56 }
modifiedcrates/nixlike/src/to_string.rsdiffbeforeafterboth
--- a/crates/nixlike/src/to_string.rs
+++ b/crates/nixlike/src/to_string.rs
@@ -5,7 +5,7 @@
 };
 
 fn write_nix_obj_key_buf(k: &str, v: &Value, out: &mut PrintItems) {
-	if k.contains(".") {
+	if k.contains('.') {
 		out.push_str("\"");
 		out.push_str(k);
 		out.push_str("\"");
@@ -39,7 +39,7 @@
 				.replace('\n', "\\n")
 				.replace('\t', "\\t")
 				.replace('\r', "\\r")
-				.replace("$", "\\$")
+				.replace('$', "\\$")
 		)),
 		Value::Array(a) => {
 			if a.is_empty() {