From 6d5d16e696ed61b2782687e277634d999155c16f Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Tue, 26 Sep 2023 11:21:41 +0200 Subject: [PATCH] Fix formatting --- src/graph/builder.rs | 2 +- tests/generate_graph.rs | 63 +++++++++++++++++++++++++++++++++++------ 2 files changed, 55 insertions(+), 10 deletions(-) diff --git a/src/graph/builder.rs b/src/graph/builder.rs index 0bd8d30..5f07634 100644 --- a/src/graph/builder.rs +++ b/src/graph/builder.rs @@ -113,7 +113,7 @@ impl<'a> Builder<'a> { for declaration in module_hir.declarations(self.db) { let Some(declaration_idx) = self.process_moduledef(declaration, is_recursive) else { - continue + continue; }; let edge = Edge { diff --git a/tests/generate_graph.rs b/tests/generate_graph.rs index bc49196..b0d02c8 100644 --- a/tests/generate_graph.rs +++ b/tests/generate_graph.rs @@ -103,7 +103,12 @@ mod negative_args { for (args, expected) in args_for(command, "cfg-test", false) { let app = App::parse_from(&args); - let Generate { cmd: Command::Graph(cmd) } = app.command else { continue; }; + let Generate { + cmd: Command::Graph(cmd), + } = app.command + else { + continue; + }; assert_eq!(cmd.project.cfg_test, expected, "{:?}", args); } @@ -116,7 +121,12 @@ mod negative_args { for (args, expected) in args_for(command, "sysroot", false) { let app = App::parse_from(&args); - let Generate { cmd: Command::Graph(cmd) } = app.command else { continue; }; + let Generate { + cmd: Command::Graph(cmd), + } = app.command + else { + continue; + }; assert_eq!(cmd.project.sysroot, expected, "{:?}", args); } @@ -133,7 +143,12 @@ mod negative_args { for (args, expected) in args_for(command, "fns", false) { let app = App::parse_from(&args); - let Generate { cmd: Command::Graph(cmd) } = app.command else { continue; }; + let Generate { + cmd: Command::Graph(cmd), + } = app.command + else { + continue; + }; assert_eq!(cmd.graph.fns, expected, "{:?}", args); } @@ -146,7 +161,12 @@ mod negative_args { for (args, expected) in args_for(command, "orphans", false) { let app = App::parse_from(&args); - let Generate { cmd: Command::Graph(cmd) } = app.command else { continue; }; + let Generate { + cmd: Command::Graph(cmd), + } = app.command + else { + continue; + }; assert_eq!(cmd.graph.orphans, expected, "{:?}", args); } @@ -159,7 +179,12 @@ mod negative_args { for (args, expected) in args_for(command, "tests", false) { let app = App::parse_from(&args); - let Generate { cmd: Command::Graph(cmd) } = app.command else { continue; }; + let Generate { + cmd: Command::Graph(cmd), + } = app.command + else { + continue; + }; assert_eq!(cmd.graph.tests, expected, "{:?}", args); } @@ -172,7 +197,12 @@ mod negative_args { for (args, expected) in args_for(command, "types", false) { let app = App::parse_from(&args); - let Generate { cmd: Command::Graph(cmd) } = app.command else { continue; }; + let Generate { + cmd: Command::Graph(cmd), + } = app.command + else { + continue; + }; assert_eq!(cmd.graph.types, expected, "{:?}", args); } @@ -188,7 +218,12 @@ mod negative_args { for (args, expected) in args_for("graph", "modules", true) { let app = App::parse_from(&args); - let Generate { cmd: Command::Graph(cmd) } = app.command else { continue; }; + let Generate { + cmd: Command::Graph(cmd), + } = app.command + else { + continue; + }; assert_eq!(cmd.modules, expected, "{:?}", args); } @@ -199,7 +234,12 @@ mod negative_args { for (args, expected) in args_for("graph", "uses", false) { let app = App::parse_from(&args); - let Generate { cmd: Command::Graph(cmd) } = app.command else { continue; }; + let Generate { + cmd: Command::Graph(cmd), + } = app.command + else { + continue; + }; assert_eq!(cmd.uses, expected, "{:?}", args); } @@ -210,7 +250,12 @@ mod negative_args { for (args, expected) in args_for("graph", "externs", false) { let app = App::parse_from(&args); - let Generate { cmd: Command::Graph(cmd) } = app.command else { continue; }; + let Generate { + cmd: Command::Graph(cmd), + } = app.command + else { + continue; + }; assert_eq!(cmd.externs, expected, "{:?}", args); }