Skip to content

README is incorrect about what the sample code prints #74

@tekknolagi

Description

@tekknolagi

Bug Report

Your Environment

Software Version(s)
hypercore 0.9.0
Rustc rustc 1.35.0-nightly (237bf3244 2019-03-28)
Operating System Ubuntu 18.04

Expected Behavior

Program prints

hello
world

Current Behavior

Program prints

Ok(Some([104, 101, 108, 108, 111]))
Ok(Some([119, 111, 114, 108, 100]))

Code Sample

extern crate hypercore;

use hypercore::Feed;
use std::path::PathBuf;

let path = PathBuf::from("./my-first-dataset");
let mut feed = Feed::new(&path).unwrap();

feed.append(b"hello").unwrap();
feed.append(b"world").unwrap();

println!("{:?}", feed.get(0)); // prints "hello"
println!("{:?}", feed.get(1)); // prints "world"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions