Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: martinvuyk <110240700+martinvuyk@users.noreply.github.com>
Signed-off-by: Hristo (Izo) G. <53634432+izo0x90@users.noreply.github.com>
  • Loading branch information
izo0x90 and martinvuyk committed Mar 2, 2025
1 parent 77848c3 commit 592a184
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mojo/stdlib/src/builtin/file_descriptor.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,10 @@ struct FileDescriptor(Writer):

@always_inline
fn read_bytes(mut self, buffer: Span[mut=True, Byte]) raises -> UInt:
"""
Read a number of bytes from the file.
"""Read a number of bytes from the file into a buffer.
Args:
buffer: Span[Byte] of length n where to store read bytes. n = number of bytes to read.
buffer: A `Span[Byte]` to read bytes into. Read up to `len(buffer)` number of bytes.
Returns:
Actual number of bytes read.
Expand All @@ -108,7 +107,7 @@ struct FileDescriptor(Writer):

@parameter
if os_is_macos() or os_is_linux():
read = external_call["read", c_ssize_t](
var read = external_call["read", c_ssize_t](
self.value, buffer.unsafe_ptr(), len(buffer)
)
if read < 0:
Expand Down

0 comments on commit 592a184

Please sign in to comment.