From e62ae6b86793b7ab7eaefade7597926e50e6df23 Mon Sep 17 00:00:00 2001 From: Martin Nowak Date: Fri, 11 May 2018 02:52:58 +0200 Subject: [PATCH] fix a few readme issues --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9a332d8..b94e398 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Documentation [std.io](https://martinnowak.github.io/io/std/io) -IOs are thin, OS-independent abstractions I/O devices. +IOs are thin, OS-independent abstractions over I/O devices. ```d size_t write(const scope ubyte[] buffer); size_t read(scope ubyte[] buffer); @@ -36,11 +36,13 @@ catch (IOException e) IOs use unique ownership and are [moveable](https://dlang.org/phobos/std_algorithm_mutation.html#.move) but not copyable (Use [refCounted](https://dlang.org/phobos/std_typecons.html#refCounted) for shared ownership). ```d io2 = io.move; -assert(!io2.isClosed); -assert(io.isClosed); +assert(io2.isOpen); +assert(!io.isOpen); auto rc = refCounted(io2.move); auto rc2 = rc; +assert(rc.isOpen); +assert(rc2.isOpen); ``` IOs can be converted to polymorphic interfaces if necessary.