File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2361,6 +2361,7 @@ struct Appender(A : T[], T)
23612361 emplace(&it, items.front);
23622362 else
23632363 it = items.front;
2364+ items.popFront();
23642365 }
23652366 }
23662367 else
@@ -2372,6 +2373,7 @@ struct Appender(A : T[], T)
23722373 emplace(&it, getUItem (items.front));
23732374 else
23742375 it = getUItem(items.front);
2376+ items.popFront();
23752377 }
23762378 }
23772379
@@ -2874,6 +2876,14 @@ unittest
28742876 assert (app3.data == [1 , 2 , 3 ]);
28752877}
28762878
2879+ unittest
2880+ {
2881+ Appender! (int []) app;
2882+ short [] range = [1 , 2 , 3 ];
2883+ app.put(range);
2884+ assert (app.data == [1 , 2 , 3 ]);
2885+ }
2886+
28772887/*
28782888A simple slice type only holding pointers to the beginning and the end
28792889of an array. Experimental duplication of the built-in slice - do not
You can’t perform that action at this time.
0 commit comments