summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorZuhaitz <zuhaitz.zechhub@gmail.com>2026-01-24 00:41:55 +0000
committerGitHub <noreply@github.com>2026-01-24 00:41:55 +0000
commitf88dbd3140be8733ad464b669e0c9e977a4c3a13 (patch)
tree346b6a2324f2ced947575ea19011ae8d1c68f49a /README.md
parent9608435f5b1b12985d7ee3f66e25041eac8b241c (diff)
Refactor Drop implementation in README example
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 466ee55..b968964 100644
--- a/README.md
+++ b/README.md
@@ -567,8 +567,8 @@ fn main() {
Implement `Drop` to run cleanup logic automatically.
```zc
impl Drop for MyStruct {
- fn drop(mut self) {
- free(self.data);
+ fn drop(self) {
+ self.free();
}
}
```