Add a method for mutating blog post texts

This commit is contained in:
Manuel Thalmann 2025-04-12 09:27:54 +02:00
parent f924172cb4
commit c2e1f27302
Signed by: manuth
SSH key fingerprint: SHA256:HsMLC+7kJWALP6YCYCoopxNbUnghwSGLVcG76SECT5c

View file

@ -10,6 +10,10 @@ impl Post {
content: String::new(),
}
}
pub fn add_text(&mut self, text: &str) {
self.content.push_str(text);
}
}
trait State {}