Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish #77

Merged
merged 8 commits into from
Jul 19, 2019
Merged

Polish #77

merged 8 commits into from
Jul 19, 2019

Conversation

yoshuawuyts
Copy link
Contributor

Applies a much needed layer of polish to Hypercore. Among other things it makes building Hypercore instances a lot more ergonomic, and fixes the existing failures.

This is a bit of an "everything" patch because, well, nobody is working actively on Hypercore at the moment so I figured there'd be little harm in just creating a big ol' patch to add all changes (and get back to making dependabot happy).

Code Example

let mut feed = hypercore::open("./feed.db")?;

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

assert_eq!(feed.get(0)?, Some(b"hello".to_vec()));
assert_eq!(feed.get(1)?, Some(b"world".to_vec()));

Changes

  • updated to rust 2019
  • upgraded dependencies
  • updated to standard rust fmt formatting
  • added hypercore::open
  • renamed Feed::new to Feed::open to be consistent with std::fs::File, and pass the clippy lint

Related Patches

Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
@yoshuawuyts
Copy link
Contributor Author

Going to go ahead and merge these changes (:

@yoshuawuyts yoshuawuyts merged commit 3a602d9 into master Jul 19, 2019
@delete-merged-branch delete-merged-branch bot deleted the polish branch July 19, 2019 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant