Skip to content

Commit

Permalink
Merge pull request #2 from LyleDavis/duplication
Browse files Browse the repository at this point in the history
remove duplication
  • Loading branch information
LyleDavis committed Oct 13, 2020
2 parents 8f2a206 + f35ae8f commit 3668a49
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Chainz/Chain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ public Chain<TArg> Use<TChainLink>() where TChainLink : IChainLink<TArg>
/// <returns>Returns self for fluid interface</returns>
public Chain<TArg> Prepend<TChainLink>() where TChainLink : IChainLink<TArg>
{
InsertAt<TChainLink>(0);
return this;
return InsertAt<TChainLink>(0);
}

/// <summary>
Expand All @@ -50,8 +49,7 @@ public Chain<TArg> After<TPreviousChainLink, TChainLinkToInsert>()
where TChainLinkToInsert : IChainLink<TArg>
{
var index = _links.IndexOf(typeof(TPreviousChainLink)) + 1;
_links.Insert(index, typeof(TChainLinkToInsert));
return this;
return InsertAt<TChainLinkToInsert>(index);
}

/// <summary>
Expand All @@ -65,8 +63,7 @@ public Chain<TArg> Before<TNextChainLink, TChainLinkToInsert>()
where TChainLinkToInsert : IChainLink<TArg>
{
var index = _links.IndexOf(typeof(TNextChainLink));
_links.Insert(index, typeof(TChainLinkToInsert));
return this;
return InsertAt<TChainLinkToInsert>(index);
}

/// <summary>
Expand Down

0 comments on commit 3668a49

Please sign in to comment.