]> Repositorios git - scryer-prolog.git/commitdiff
fix clippy
authorBennet Bleßmann <[email protected]>
Sat, 6 Jul 2024 16:26:34 +0000 (18:26 +0200)
committerBennet Bleßmann <[email protected]>
Sat, 6 Jul 2024 16:26:34 +0000 (18:26 +0200)
src/machine/mod.rs
src/machine/parsed_results.rs

index 6a9c74e661de605ef59eff38f6a6b1faa4c48e51..d4a69c771db5fd683d0b1cf740fb62319c1c6641 100644 (file)
@@ -125,7 +125,7 @@ mod libraries {
     }
 
     pub(crate) fn get(name: &str) -> Option<&'static str> {
-        LIBRARIES.with(|libs| libs.get(name).map(|&lib| lib))
+        LIBRARIES.with(|libs| libs.get(name).copied())
     }
 
     #[cfg(test)]
index 681b27e4720972868a6027edfeaf04f9d1309cf0..8ca6f8e8214b611f4426557e756bc528f00628ff 100644 (file)
@@ -38,7 +38,7 @@ pub fn write_prolog_value_as_json<W: Write>(
                 )
             } else {
                 //return valid json string
-                writer.write_str(&s)
+                writer.write_str(s)
             }
         }
         Value::List(l) => {