From 604134740506324f9a0b24db7e214306cda50e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sat, 14 Mar 2020 18:37:18 +0100 Subject: [PATCH 1/3] Fix deprecation warning. --- source/vibe/core/concurrency.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/vibe/core/concurrency.d b/source/vibe/core/concurrency.d index 70be177..f6402c5 100644 --- a/source/vibe/core/concurrency.d +++ b/source/vibe/core/concurrency.d @@ -769,7 +769,7 @@ private mixin template isolatedArrayMethods(T, bool mutableRef = true) @property void length(size_t value) pure { m_array.length = value; } - void opCatAssign(T item) pure + void opOpAssign(string op = "~")(T item) pure { static if( isCopyable!T ) m_array ~= item; else { @@ -778,7 +778,7 @@ private mixin template isolatedArrayMethods(T, bool mutableRef = true) } } - void opCatAssign(IsolatedArray!T array) pure + void opOpAssign(string op = "~")(IsolatedArray!T array) pure { static if( isCopyable!T ) m_array ~= array.m_array; else { From 50100853403d99a07b2bea4e86885ae12c954aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sat, 14 Mar 2020 18:37:54 +0100 Subject: [PATCH 2/3] Fix documentation of pipe(). --- source/vibe/core/stream.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/vibe/core/stream.d b/source/vibe/core/stream.d index 6a68f87..ab34f6a 100644 --- a/source/vibe/core/stream.d +++ b/source/vibe/core/stream.d @@ -27,12 +27,12 @@ public import eventcore.driver : IOMode; /** Pipes an InputStream directly into this OutputStream. - The number of bytes written is either the whole input stream when `nbytes == 0`, or exactly - `nbytes` for `nbytes > 0`. If the input stream contains less than `nbytes` of data, an - exception is thrown. + The number of bytes written is either the whole input stream when + `nbytes == ulong.max`, or exactly `nbytes` for `nbytes < ulong.max`. If the + input stream contains less than `nbytes` of data, an exception is thrown. Returns: - The actual number of bytes written is returned. If `nbytes` is given + The actual number of bytes written is returned. If `nbytes` is given and not equal to `ulong.max`, íts value will be returned. */ ulong pipe(InputStream, OutputStream)(InputStream source, OutputStream sink, ulong nbytes) From 0122e665db31ee06c66af9a6ed0b6e041ac16c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sat, 14 Mar 2020 18:38:47 +0100 Subject: [PATCH 3/3] Fix contract for Timer.rearm. --- source/vibe/core/core.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/vibe/core/core.d b/source/vibe/core/core.d index ee507a2..543ed2b 100644 --- a/source/vibe/core/core.d +++ b/source/vibe/core/core.d @@ -1145,7 +1145,7 @@ struct Timer { /** Resets the timer to the specified timeout */ void rearm(Duration dur, bool periodic = false) nothrow - in { assert(dur > 0.seconds, "Negative timer duration specified."); } + in { assert(dur >= 0.seconds, "Negative timer duration specified."); } body { m_driver.timers.set(m_id, dur, periodic ? dur : 0.seconds); } /** Resets the timer and avoids any firing.