Fix compile warning with --cfg require_route_graph_test
[rust-lightning] / lightning / src / routing / router.rs
index 5e36a281fce18b4379634b35aed7572289cda16a..0ad307cdf2f17bf1a347b535ebf5009e9a000c14 100644 (file)
@@ -3851,7 +3851,8 @@ mod tests {
                        });
                #[cfg(require_route_graph_test)]
                return Ok(res.expect("Didn't have route graph and was configured to require it"));
-               res
+               #[cfg(not(require_route_graph_test))]
+               return res;
        }
 
        pub(super) fn random_init_seed() -> u64 {