From 0308496525bc6b4b9a810044e4cbdad9d2ce0853 Mon Sep 17 00:00:00 2001 From: Aravind A <121489927+aravinda333@users.noreply.github.com> Date: Fri, 14 Aug 2026 06:01:44 +0530 Subject: [PATCH] Made purpose of file handle accurate. The File::open() function opens the file only in read only mode, so the resulting handle can be used only for reading from the file. I updated the text by removing the text "or writing" to accurately reflect my finding. Yours respectfully, Aravind A (Son Of Sindhu) --- src/ch09-02-recoverable-errors-with-result.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ch09-02-recoverable-errors-with-result.md b/src/ch09-02-recoverable-errors-with-result.md index fa26509d7a..ea541b6ea7 100644 --- a/src/ch09-02-recoverable-errors-with-result.md +++ b/src/ch09-02-recoverable-errors-with-result.md @@ -73,8 +73,7 @@ before the `Ok` and `Err` variants in the `match` arms. When the result is `Ok`, this code will return the inner `file` value out of the `Ok` variant, and we then assign that file handle value to the variable -`greeting_file`. After the `match`, we can use the file handle for reading or -writing. +`greeting_file`. After the `match`, we can use the file handle for reading. The other arm of the `match` handles the case where we get an `Err` value from `File::open`. In this example, we’ve chosen to call the `panic!` macro. If