Skip to content

Commit 94023c8

Browse files
authored
Merge pull request sekineh#21 from sekineh/v030
bump to v0.3.0.
2 parents 13f9a2f + 79476e1 commit 94023c8

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.3.0] - 2020-07-08
10+
911
### Added
1012

1113
* Quickstart section in the doc

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "binary-heap-plus"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
authors = ["SEKINE, Hideki <sekineh@me.com>"]
55
description = "Enhanced version of std::collections::BinaryHeap that supports max, min, and custom-order heaps."
66
license = "MIT"
@@ -15,7 +15,7 @@ compare = "0.1.0"
1515
serde = { version = "1.0", optional = true, features = ["derive"] }
1616

1717
[dev-dependencies]
18-
serde_json = "1.0.39"
18+
serde_json = "1.0.56"
1919

2020
[badges]
2121
# TODO: waiting for PR to land...: https://github.com/rust-lang/crates.io/pull/1838#

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,24 @@
44

55
Enhancement over Rust's `std::collections::BinaryHeap`.
66

7-
It supports the following features and still maintains backward compatibility.
7+
It supports the following heaps and still maintains backward compatibility.
88
- Max heap
9+
- Use `BinaryHeap::new()` or `::with_capacity()`
910
- Min heap
11+
- Use `BinaryHeap::new_min()` or `::with_capacity_min()`
1012
- Heap ordered by closure
13+
- Use `BinaryHeap::new_by()` or `::with_capacity_by()`
1114
- Heap ordered by key generated by closure
15+
- Use `BinaryHeap::new_by_key()` or `::with_capacity_by_key()`
1216

13-
Notable added method is:
14-
- `.into_iter_sorted()` backported from `std`.
17+
Other notable added methods are:
18+
- `BinaryHeap::from_vec_cmp()` and `BinaryHeap::from_vec()` for more generic construction.
19+
- `.into_iter_sorted()` which is less-surprising version of `.into_iter()`. The implementation is backported from `std`.
1520

1621
## MSRV (Minimum Supported Rust Version)
1722

1823
This crate requires Rust 1.31.1 or later.
1924

20-
## Note on `BinaryHeap::from_vec()`
21-
22-
Currently, the `From<Vec<T>>` trait is implemented for max heap only.
23-
If you add generic impl for other heaps, the existing code breaks, requires
24-
slight modification such as type annotation.
25-
26-
To maintain good compatibility with `std` version, `::from_vec()` method was added
27-
for the same purpose.
28-
2925
# Changes
3026

3127
See CHANGELOG.md.

0 commit comments

Comments
 (0)