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

chore: encapsulate IO logic in IO functions #885

Merged
merged 6 commits into from
Feb 21, 2023
Merged

Conversation

TomAFrench
Copy link
Member

Related issue(s)

Resolves #

Description

Summary of changes

We currently had some special logic related to:

  • avoiding reading files which we expect to be empty
  • splitting off return value from BTreeMap loaded from file / inserting return value to be saved to file.

which exists in the CLI business logic. As this is purely an IO implementation detail I've pushed it inside the relevant helpers.

Dependency additions / changes

Test additions / changes

Checklist

  • I have tested the changes locally. (Tested and confirmed to work in conjunction with fix(abi): ensure that return value is loaded from toml #883)
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.
  • This PR requires documentation updates when merged.

Additional context

crates/nargo/src/cli/mod.rs Show resolved Hide resolved
crates/nargo/src/cli/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@TomAFrench TomAFrench added this pull request to the merge queue Feb 21, 2023
Merged via the queue into master with commit db5c588 Feb 21, 2023
@TomAFrench TomAFrench deleted the io-encapsulation branch February 21, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants