io.serial: use io.streams.duplex:with-stream.

freebsd-work
John Benediktsson 2019-01-10 20:34:58 -08:00
parent 75f36fa9c5
commit 15fff4a1fd
1 changed files with 1 additions and 4 deletions

View File

@ -23,10 +23,7 @@ M: serial-port dispose* ( serial -- ) stream>> dispose ;
swap >>path swap >>path
default-serial-flags ; default-serial-flags ;
: with-duplex-stream ( duplex-stream quot -- )
[ [ in>> ] [ out>> ] bi ] dip with-streams ; inline
: with-serial-port ( serial-port quot -- ) : with-serial-port ( serial-port quot -- )
[ open-serial ] dip with-duplex-stream ; inline [ open-serial ] dip with-stream ; inline
"io.serial." os name>> append require "io.serial." os name>> append require