Skip to content

feat: merge right on config#476

Merged
tusharmath merged 9 commits intomainfrom
feat-merge
Oct 13, 2023
Merged

feat: merge right on config#476
tusharmath merged 9 commits intomainfrom
feat-merge

Conversation

@amitksingh1490
Copy link
Copy Markdown
Collaborator

@amitksingh1490 amitksingh1490 commented Oct 12, 2023

Fixes: #468
Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh to address and fix linting issues.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly (if applicable).
  • I have performed a self-review of my own code.

@amitksingh1490 amitksingh1490 force-pushed the feat-merge branch 3 times, most recently from 68f05cd to c2407b4 Compare October 13, 2023 07:18
@amitksingh1490 amitksingh1490 marked this pull request as ready for review October 13, 2023 08:26
Comment on lines +277 to +280
pub fn merge_right(&mut self, other: Self) -> Self {
self.types.extend(other.types);
self.clone()
}
Copy link
Copy Markdown
Contributor

@tusharmath tusharmath Oct 13, 2023

Choose a reason for hiding this comment

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

Suggested change
pub fn merge_right(&mut self, other: Self) -> Self {
self.types.extend(other.types);
self.clone()
}
pub fn merge_right(mut self, other: Self) -> Self {
self.types.extend(other.types);
self
}

Comment on lines +52 to +53
pub(crate) fn merge_right(self, other: Self) -> Self {
let mut merged = self.clone();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub(crate) fn merge_right(self, other: Self) -> Self {
let mut merged = self.clone();
pub(crate) fn merge_right(mut self, other: Self) -> Self {
let mut merged = self; // inline merged

Comment on lines +144 to +146
pub fn merge_right(self, other: Self) -> Self {
let mut merged = self.clone();
merged.allowed_headers = other.allowed_headers.map(|other| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub fn merge_right(self, other: Self) -> Self {
let mut merged = self.clone();
merged.allowed_headers = other.allowed_headers.map(|other| {
pub fn merge_right(mut self, other: Self) -> Self {
let mut merged = self;
merged.allowed_headers = other.allowed_headers.map(|other| {

@tusharmath tusharmath merged commit e8e0f40 into main Oct 13, 2023
@tusharmath tusharmath deleted the feat-merge branch October 13, 2023 11:00
digital-phoenix pushed a commit to digital-phoenix/tailcall that referenced this pull request Oct 15, 2023
* commit '69814ec785fef5d5cf3d4ba925a4910e0a09715e':
  refactor: use default batch settings if group_by is used (tailcallhq#497)
  refactor: use blueprint server throughout (tailcallhq#495)
  feat: hostname config in server (tailcallhq#493)
  Load YAML & JSON formats via CLI (tailcallhq#467)
  fix(deps): update rust crate regex to 1.10.1 (tailcallhq#491)
  fix(deps): update rust crate async-trait to 0.1.74 (tailcallhq#492)
  feat: support custom-headers (tailcallhq#455)
  fix: n + 1 issue (tailcallhq#487)
  fix: mandatory file path
  refactor: drop key from group by (tailcallhq#484)
  feature: load multiple configs via CLI (tailcallhq#482)
  feat: merge right on config (tailcallhq#476)
  doc: example update
  fix: upstream setting keys should be optional (tailcallhq#474)
  refactor: prerequisite to test multi sdl (tailcallhq#475)
  refactor: use btreeset where duplicates are not allowed (tailcallhq#478)
  fix: info loss in const serialisation (tailcallhq#477)
  feat: support to configure http settings (tailcallhq#388)
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.

Support merge_right on Config

2 participants