File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Microsoft.Toolkit.HighPerformance/Enumerables Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,12 @@ public readonly Item Current
78
78
ref T r0 = ref MemoryMarshal . GetReference ( this . span ) ;
79
79
ref T ri = ref Unsafe . Add ( ref r0 , this . index ) ;
80
80
81
- // On .NET Standard 2.1 we can save 4 bytes by piggybacking
82
- // the current index in the length of the wrapped span.
83
- // We're going to use the first item as the target reference,
84
- // and the length as a host for the current original offset.
85
- // This is not possible on . NET Standard 2.1 as we lack
86
- // the API to create spans from arbitrary references.
81
+ // On .NET Standard 2.1 and .NET Core (or on any target that offers runtime
82
+ // support for the Span<T> types), we can save 4 bytes by piggybacking the
83
+ // current index in the length of the wrapped span. We're going to use the
84
+ // first item as the target reference, and the length as a host for the
85
+ // current original offset. This is not possible on eg. . NET Standard 2.0,
86
+ // as we lack the API to create Span<T>-s from arbitrary references.
87
87
return new Item ( ref ri , this . index ) ;
88
88
#else
89
89
return new Item ( this . span , this . index ) ;
You can’t perform that action at this time.
0 commit comments