File tree Expand file tree Collapse file tree 3 files changed +12
-14
lines changed Expand file tree Collapse file tree 3 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
7
7
## [ Unreleased]
8
8
9
+ ## [ 0.3.0] - 2020-07-08
10
+
9
11
### Added
10
12
11
13
* Quickstart section in the doc
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " binary-heap-plus"
3
- version = " 0.2 .0"
3
+ version = " 0.3 .0"
4
4
authors = [" SEKINE, Hideki <sekineh@me.com>" ]
5
5
description = " Enhanced version of std::collections::BinaryHeap that supports max, min, and custom-order heaps."
6
6
license = " MIT"
@@ -15,7 +15,7 @@ compare = "0.1.0"
15
15
serde = { version = " 1.0" , optional = true , features = [" derive" ] }
16
16
17
17
[dev-dependencies ]
18
- serde_json = " 1.0.39 "
18
+ serde_json = " 1.0.56 "
19
19
20
20
[badges ]
21
21
# TODO: waiting for PR to land...: https://github.com/rust-lang/crates.io/pull/1838#
Original file line number Diff line number Diff line change 4
4
5
5
Enhancement over Rust's ` std::collections::BinaryHeap ` .
6
6
7
- It supports the following features and still maintains backward compatibility.
7
+ It supports the following heaps and still maintains backward compatibility.
8
8
- Max heap
9
+ - Use ` BinaryHeap::new() ` or ` ::with_capacity() `
9
10
- Min heap
11
+ - Use ` BinaryHeap::new_min() ` or ` ::with_capacity_min() `
10
12
- Heap ordered by closure
13
+ - Use ` BinaryHeap::new_by() ` or ` ::with_capacity_by() `
11
14
- Heap ordered by key generated by closure
15
+ - Use ` BinaryHeap::new_by_key() ` or ` ::with_capacity_by_key() `
12
16
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 ` .
15
20
16
21
## MSRV (Minimum Supported Rust Version)
17
22
18
23
This crate requires Rust 1.31.1 or later.
19
24
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
-
29
25
# Changes
30
26
31
27
See CHANGELOG.md.
You can’t perform that action at this time.
0 commit comments