Skip to content

Commit

Permalink
Remove unnecessary with_inner_type declarations
Browse files Browse the repository at this point in the history
Signed-off-by: Luc Perkins <luc@timber.io>
  • Loading branch information
Luc Perkins committed Jan 8, 2021
1 parent 85c0c9c commit 7c748cc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
9 changes: 1 addition & 8 deletions lib/remap-functions/src/append.rs
Expand Up @@ -53,20 +53,13 @@ impl Expression for AppendFn {
let items_type = self
.items
.type_def(state)
.fallible_unless(Kind::Array)
.with_inner_type(self.items.type_def(state).inner_type_def);
.fallible_unless(Kind::Array);

self.value
.type_def(state)
.fallible_unless(Kind::Array)
.merge(items_type)
.with_constraint(Kind::Array)
.with_inner_type(
self.items
.type_def(state)
.merge(self.value.type_def(state))
.inner_type_def,
)
}
}

Expand Down
6 changes: 0 additions & 6 deletions lib/remap-functions/src/push.rs
Expand Up @@ -57,12 +57,6 @@ impl Expression for PushFn {
.fallible_unless(Kind::Array)
.merge(item_type)
.with_constraint(Kind::Array)
.with_inner_type(
self.item
.type_def(state)
.merge(self.value.type_def(state))
.inner_type_def,
)
}
}

Expand Down

0 comments on commit 7c748cc

Please sign in to comment.