Skip to content

actionkv1 position for insert #68

Open

Description

@jflasche

Hi Tim,

in code/ch7/ch7-actionkv1/src/lib.rs line 196..=198:
let next_byte = SeekFrom::End(0);
let current_position = f.seek(SeekFrom::Current(0))?;
f.seek(next_byte)?;

current_position does not necessarily reflects the end of the file, but a new record should always go to the end.

so, shouldn't it be just simple a one line:
let current_position = f.seek(SeekFrom::End(0))?;

Thanks for clarification
Jens

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions