Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
Apply opt to non-generic
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams committed Feb 11, 2018
1 parent d5d00e3 commit cbd2130
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Kestrel.Core/Internal/Http/HttpProtocol.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ object IFeatureCollection.this[Type key]
{
get
{
object feature;
object feature = null;
if (key == IHttpRequestFeatureType)
{
feature = _currentIHttpRequestFeature;
Expand Down Expand Up @@ -171,7 +171,7 @@ object IFeatureCollection.this[Type key]
{
feature = _currentIHttpSendFileFeature;
}
else
else if (MaybeExtra != null)
{
feature = ExtraFeatureGet(key);
}
Expand Down
4 changes: 2 additions & 2 deletions tools/CodeGenerator/HttpProtocolFeatureCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ object IFeatureCollection.this[Type key]
{{
get
{{
object feature;{Each(allFeatures, feature => $@"
object feature = null;{Each(allFeatures, feature => $@"
{(feature.Index != 0 ? "else " : "")}if (key == {feature.Name}Type)
{{
feature = _current{feature.Name};
}}")}
else
else if (MaybeExtra != null)
{{
feature = ExtraFeatureGet(key);
}}
Expand Down

0 comments on commit cbd2130

Please sign in to comment.