Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow SharedSystem to be used behind a non-mutable reference #378

Merged
merged 4 commits into from
Jul 4, 2024

Commits on Jul 3, 2024

  1. Extract SelectSystem to separate module

    To keep the system module focused on the System trait, this commit
    extracts the SelectSystem struct and related items to a new file.
    magicant committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    f80ae1d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    83827da View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e27be00 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2024

  1. Let SharedSystem methods take &self instead of &mut self

    This commit updates the `SharedSystem` methods `set_nonblocking`,
    `reset_nonblocking`, `read_async`, `write_all`, and `print_error` to
    take immutable references (`&self`) instead of mutable references
    (`&mut self`).
    
    This change is made to reflect the fact that these methods do not
    mutate the `SharedSystem` instance itself, but rather the `SelectSystem`
    instance that it contains.
    
    Previously, when you have a non-mutable reference to a `SharedSystem`,
    you had to clone it to call these methods. Now, you can call them
    directly.
    magicant committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    f5bea99 View commit details
    Browse the repository at this point in the history