Skip to content

Refactor deploys#2161

Merged
szokeasaurusrex merged 2 commits intomasterfrom
szokeasaurusrex/deploy-refactor
Sep 20, 2024
Merged

Refactor deploys#2161
szokeasaurusrex merged 2 commits intomasterfrom
szokeasaurusrex/deploy-refactor

Conversation

@szokeasaurusrex
Copy link
Member

@szokeasaurusrex szokeasaurusrex commented Sep 20, 2024

  • Use Cow<str> rather than String in the Deploy struct to avoid allocations where unnecessary
  • Separate Deploy struct into separate module

I have split this PR into two commits which separately implement each of the above changes. It might be easier to review the commits individually.

ref #2077

@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/deploy-refactor branch from 7bf2b6b to 58a0e42 Compare September 20, 2024 07:57
@szokeasaurusrex szokeasaurusrex self-assigned this Sep 20, 2024
Base automatically changed from szokeasaurusrex/deploy-fix to master September 20, 2024 11:44
We are using owned `String` types in this struct, where using `Cow<str>` would allow us to avoid allocations when constructing `Deploy`s in the `deploy new` command. We use `Cow<str>` rather than `&str` because `Deploy` needs to satisfy `DeserializeOwned`.
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/deploy-refactor branch from 58a0e42 to 83d2465 Compare September 20, 2024 15:52
@szokeasaurusrex szokeasaurusrex enabled auto-merge (squash) September 20, 2024 15:53
@szokeasaurusrex szokeasaurusrex merged commit 19d08fb into master Sep 20, 2024
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/deploy-refactor branch September 20, 2024 15:58
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.

2 participants