Skip to content

Commit 712469a

Browse files
committed
Use return scope in ScopedBuffer members
1 parent f2b9a99 commit 712469a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/mir/appender.d

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ struct ScopedBuffer(T, size_t bytes = 4096)
2929
else
3030
private align(T.alignof) ubyte[_bufferLength * T.sizeof] _scopeBufferPayload = void;
3131

32-
private ref inout(T[_bufferLength]) _scopeBuffer() inout @trusted scope
32+
private ref inout(T[_bufferLength]) _scopeBuffer() inout @trusted return scope
3333
{
3434
return *cast(inout(T[_bufferLength])*)&_scopeBufferPayload;
3535
}
3636

37-
private T[] prepare(size_t n) @trusted scope
37+
private T[] prepare(size_t n) @trusted return scope
3838
{
3939
import mir.internal.memory: realloc, malloc;
4040
_currentLength += n;
@@ -210,7 +210,7 @@ struct ScopedBuffer(T, size_t bytes = 4096)
210210
}
211211

212212
///
213-
inout(T)[] data() inout @property @safe scope
213+
inout(T)[] data() inout @property @safe return scope
214214
{
215215
return _buffer.length ? _buffer[0 .. _currentLength] : _scopeBuffer[0 .. _currentLength];
216216
}

0 commit comments

Comments
 (0)