Merge pull request #2049 from douglaz/run-clippy-fix
[rust-lightning] / lightning-rapid-gossip-sync / src / lib.rs
index af235b1c4224d990f2a1d71881ab23e659d61e28..00aac9fd35873a8b31a218c2fa692a1664302c9a 100644 (file)
@@ -183,18 +183,17 @@ mod tests {
                                fs::create_dir_all(graph_sync_test_directory).unwrap();
 
                                let graph_sync_test_file = test.get_test_file_path();
-                               fs::write(&graph_sync_test_file, valid_response).unwrap();
+                               fs::write(graph_sync_test_file, valid_response).unwrap();
 
                                test
                        }
+
                        fn get_test_directory(&self) -> String {
-                               let graph_sync_test_directory = self.directory.clone() + "/graph-sync-tests";
-                               graph_sync_test_directory
+                               self.directory.clone() + "/graph-sync-tests"
                        }
+
                        fn get_test_file_path(&self) -> String {
-                               let graph_sync_test_directory = self.get_test_directory();
-                               let graph_sync_test_file = graph_sync_test_directory.to_owned() + "/test_data.lngossip";
-                               graph_sync_test_file
+                               self.get_test_directory() + "/test_data.lngossip"
                        }
                }