Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
spacejam authored Feb 2, 2020
1 parent f9941c8 commit 4c6baca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ fn main() -> io::Result<()> {
file reading:

```rust
let mut ring = rio::new().expect("create uring");
let ring = rio::new().expect("create uring");
let file = std::fs::open("file").expect("openat");
let data: &mut [u8] = &mut [0; 66];
let completion = ring.read_at(&file, &mut data, at);
Expand All @@ -156,10 +156,10 @@ completion.await?
file writing:

```rust
let mut ring = rio::new().expect("create uring");
let ring = rio::new().expect("create uring");
let file = std::fs::create("file").expect("openat");
let dater: &[u8] = &[6; 66];
let completion = ring.write_at(&file, &dater, at);
let to_write: &[u8] = &[6; 66];
let completion = ring.write_at(&file, &to_write, at);

// if using threads
completion.wait()?;
Expand Down

0 comments on commit 4c6baca

Please sign in to comment.