docs(easy_traits): fix prototype error and add pub where necessary

also improve the arguments names
This commit is contained in:
Michele Sessa 2022-10-12 15:21:05 +01:00 committed by Michele
parent 5c8406d6d0
commit 7e04c7ff10
1 changed files with 6 additions and 6 deletions

View File

@ -15,16 +15,16 @@ The trait `AppendStr` has the following functions:
```rust
#[derive(Clone)]
struct StringValue {
value: String,
pub struct StringValue {
pub value: String,
}
trait AppendStr {
fn append_str(self, new_str: String) -> Self;
pub trait AppendStr {
fn append_str(&mut self, str_to_append: String) -> Self;
fn append_number(self, new_number: f64) -> Self;
fn append_number(&mut self, nb_to_append: f64) -> Self;
fn remove_punctuation_marks(self) -> Self;
fn remove_punctuation_marks(&mut self) -> Self;
}
impl AppendStr for StringValue {