Skip to content

Commit

Permalink
refactor!: remove unused FunctionType::linear function
Browse files Browse the repository at this point in the history
BREAKING CHANGES: FunctionType::linear no longer exists
  • Loading branch information
ss2165 committed Nov 6, 2023
1 parent 080eda0 commit 78f2b19
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/types/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,23 +169,6 @@ impl FunctionType {
}

impl FunctionType {
/// Returns the linear part of the signature
/// TODO: This fails when mixing different linear types.
#[inline(always)]
pub fn linear(&self) -> impl Iterator<Item = &Type> {
debug_assert_eq!(
self.input
.iter()
.filter(|t| !t.copyable())
.collect::<Vec<_>>(),
self.output
.iter()
.filter(|t| !t.copyable())
.collect::<Vec<_>>()
);
self.input.iter().filter(|t| !t.copyable())
}

/// Returns the `Port`s in the signature for a given direction.
#[inline]
pub fn ports(&self, dir: Direction) -> impl Iterator<Item = Port> {
Expand Down

0 comments on commit 78f2b19

Please sign in to comment.