Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
regexident committed Sep 26, 2023
1 parent abcb92c commit 6d5d16e
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/graph/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
63 changes: 54 additions & 9 deletions tests/generate_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit 6d5d16e

Please sign in to comment.