Skip to content

Commit c570783

Browse files
authored
Merge pull request #1220 from austinwk/fix_format_inconsistencies
Fix minor formatting inconsistencies
2 parents ff21dd4 + 97bbb59 commit c570783

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/mod/visibility.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@ mod my_mod {
3838
// Functions declared using `pub(in path)` syntax are only visible
3939
// within the given path. `path` must be a parent or ancestor module
4040
pub(in crate::my_mod) fn public_function_in_my_mod() {
41-
print!("called `my_mod::nested::public_function_in_my_mod()`, that\n > ");
42-
public_function_in_nested()
41+
print!("called `my_mod::nested::public_function_in_my_mod()`, that\n> ");
42+
public_function_in_nested();
4343
}
4444
4545
// Functions declared using `pub(self)` syntax are only visible within
4646
// the current module, which is the same as leaving them private
4747
pub(self) fn public_function_in_nested() {
48-
println!("called `my_mod::nested::public_function_in_nested");
48+
println!("called `my_mod::nested::public_function_in_nested()`");
4949
}
5050
5151
// Functions declared using `pub(super)` syntax are only visible within
5252
// the parent module
5353
pub(super) fn public_function_in_super_mod() {
54-
println!("called my_mod::nested::public_function_in_super_mod");
54+
println!("called `my_mod::nested::public_function_in_super_mod()`");
5555
}
5656
}
5757
@@ -64,7 +64,7 @@ mod my_mod {
6464
6565
// pub(crate) makes functions visible only within the current crate
6666
pub(crate) fn public_function_in_crate() {
67-
println!("called `my_mod::public_function_in_crate()");
67+
println!("called `my_mod::public_function_in_crate()`");
6868
}
6969
7070
// Nested modules follow the same rules for visibility

0 commit comments

Comments
 (0)