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

Run rustfmt on the srcs. #12

Closed
wants to merge 1 commit into from

Conversation

waywardmonkeys
Copy link
Contributor

No description provided.

@waywardmonkeys
Copy link
Contributor Author

As mentioned in #11 ...

@@ -487,8 +512,10 @@ mod test {
#[test]
fn test_drop_db() {
let dir = TempDir::new("test").unwrap();
let env = Environment::new().set_max_dbs(2)
.open(dir.path()).unwrap();
let env = Environment::new()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatting here before was clearly bad, but I think I'd prefer a 'chop-down' style if rustfmt can support it, e.g.

        let env = Environment::new().set_max_dbs(2)
                                    .open(dir.path())
                                    .unwrap();

@danburkert
Copy link
Owner

@waywardmonkeys thanks for the PR. I'm going to be unresponsive for the next week, but I'll check back in then. Pretty much looks good except for the one nit.

@@ -61,7 +64,9 @@ pub trait Cursor<'txn> {
/// For databases with duplicate data items (`DatabaseFlags::DUP_SORT`), the
/// duplicate data items of each key will be returned before moving on to
/// the next key.
fn iter_from<K>(&mut self, key: K) -> Iter<'txn> where K: AsRef<[u8]> {
fn iter_from<K>(&mut self, key: K) -> Iter<'txn>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wrapping is a little too aggressive. I think

where_density = "Compressed"

would make it better

@danburkert
Copy link
Owner

I spent some time fiddling with rustfmt today and still couldn't get it to do what I wanted, I tried to document all the issues as comments on this PR.

@waywardmonkeys
Copy link
Contributor Author

Going to close this as I don't plan to update it and it doesn't apply. Someone can create a new one by just running cargo fmt and creating a PR.

@waywardmonkeys waywardmonkeys deleted the rustfmt branch March 2, 2018 03:25
ncloudioj pushed a commit to ncloudioj/lmdb-rs that referenced this pull request Mar 13, 2019
update minor version for breaking change to Cursor::iter_dup_of
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.

2 participants