diff options
| author | Zuhaitz <zuhaitz.zechhub@gmail.com> | 2026-01-24 00:41:55 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-24 00:41:55 +0000 |
| commit | f88dbd3140be8733ad464b669e0c9e977a4c3a13 (patch) | |
| tree | 346b6a2324f2ced947575ea19011ae8d1c68f49a /README.md | |
| parent | 9608435f5b1b12985d7ee3f66e25041eac8b241c (diff) | |
Refactor Drop implementation in README example
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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(); } } ``` |
