]> gitweb.factorcode.org Git - factor.git/commitdiff
io.streams.random: stream-copy disposes, so we don't need to.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 26 Oct 2012 05:00:02 +0000 (22:00 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 26 Oct 2012 05:00:02 +0000 (22:00 -0700)
extra/io/streams/random/random.factor

index 3ab2a482cbb5250580d33b47a8f200c701b560be..dae22b88d93dbd4f388afcefeda2fd3b32009bcd 100644 (file)
@@ -22,8 +22,5 @@ M: random-stream dispose drop ;
 INSTANCE: random-stream input-stream
 
 : random-file ( n path -- )
-    [
-        [ <random-stream> swap limit-stream ]
-        [ binary <file-writer> ] bi*
-        [ &dispose ] bi@ stream-copy
-    ] with-destructors ;
+    [ <random-stream> swap limit-stream ]
+    [ binary <file-writer> ] bi* stream-copy ;