Skip to content

Commit

Permalink
Correct test example code. (#784)
Browse files Browse the repository at this point in the history
* Correct test example code.

* Regenerate documentation
  • Loading branch information
sayrer committed Jun 22, 2021
1 parent f7e1652 commit 613c470
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/defs.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,8 @@ impl Greeter {
Greeter { greeting: greeting.to_string(), }
}

pub fn greet(&self, thing: &str) {
println!("{} {}", &self.greeting, thing);
pub fn greet(&self, thing: &str) -> String {
format!("{} {}", &self.greeting, thing)
}
}

Expand Down
4 changes: 2 additions & 2 deletions docs/flatten.md
Original file line number Diff line number Diff line change
Expand Up @@ -924,8 +924,8 @@ impl Greeter {
Greeter { greeting: greeting.to_string(), }
}

pub fn greet(&self, thing: &str) {
println!("{} {}", &self.greeting, thing);
pub fn greet(&self, thing: &str) -> String {
format!("{} {}", &self.greeting, thing)
}
}

Expand Down
4 changes: 2 additions & 2 deletions rust/private/rust.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,8 @@ rust_test = rule(
Greeter { greeting: greeting.to_string(), }
}
pub fn greet(&self, thing: &str) {
println!("{} {}", &self.greeting, thing);
pub fn greet(&self, thing: &str) -> String {
format!("{} {}", &self.greeting, thing)
}
}
Expand Down

0 comments on commit 613c470

Please sign in to comment.