Skip to content

Commit 874eae9

Browse files
committed
Update DSL
Signed-off-by: Patrick Luca Fazzi <patrick91@live.it>
1 parent d377ee1 commit 874eae9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rust_arkitect"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
authors = ["Patrick Luca Fazzi <patrick91@live.it>"]
55
edition = "2021"
66
description = "rust_arkitect is a lightweight library for defining and validating architectural rules in Rust projects"

src/dsl/architectural_rules.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl ArchitecturalRules<SubjectDefined> {
8989
}
9090
}
9191

92-
pub fn add_rule(self, rule: Box<dyn Rule>) -> ArchitecturalRules<RulesDefined> {
92+
pub fn rule(self, rule: Box<dyn Rule>) -> ArchitecturalRules<RulesDefined> {
9393
let mut rules = self.rules;
9494
rules.push(rule);
9595

@@ -151,7 +151,7 @@ impl ArchitecturalRules<RulesDefined> {
151151
}
152152
}
153153

154-
pub fn add_rule(self, rule: Box<dyn Rule>) -> ArchitecturalRules<RulesDefined> {
154+
pub fn rule(self, rule: Box<dyn Rule>) -> ArchitecturalRules<RulesDefined> {
155155
let mut rules = self.rules;
156156
rules.push(rule);
157157

@@ -232,7 +232,7 @@ mod tests {
232232
let rules = ArchitecturalRules::define()
233233
.rules_for_crate("application")
234234
.may_depend_on(&["my_app", "domain"])
235-
.add_rule(custom_rule)
235+
.rule(custom_rule)
236236
.build();
237237

238238
assert_eq!(rules.len(), 2);

0 commit comments

Comments
 (0)