Skip to content

Commit f349ad1

Browse files
Cleanup return
1 parent 057099b commit f349ad1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/ImageSharp.Web/Commands/CommandParser.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,10 @@ public CommandParser(IEnumerable<ICommandConverter> converters)
6767
}
6868
}
6969

70-
// We don't actually return here.
71-
// The compiler just cannot see our exception.
72-
ThrowNotSupported(type);
73-
return default;
70+
return ThrowNotSupported<T>(type);
7471
}
7572

76-
[MethodImpl(MethodImplOptions.NoInlining)]
7773
[DoesNotReturn]
78-
private static void ThrowNotSupported(Type type)
74+
private static T ThrowNotSupported<T>(Type type)
7975
=> throw new NotSupportedException($"Cannot convert to {type.FullName}.");
8076
}

0 commit comments

Comments
 (0)