Skip to content

Commit a514f3f

Browse files
authored
Merge pull request #112 from jguhlin/Update-0.1.23
Prep release
2 parents eb76878 + cb26e8f commit a514f3f

File tree

6 files changed

+46
-35
lines changed

6 files changed

+46
-35
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
### 0.1.23 minimap2 2.28
2+
+ Functions to set flag opts for MapOpt and IdxOpt @dwpeng
23
+ Fixed memory leak when not dropping mm_idx_t properly. This is done by adding in syntactic sugar in minimap2-sys @jguhlin
34

45
### 0.1.22 minimap2 2.28
5-
#### Changes
66
+ Fixed a memory segfault when re-using a thread local buffer. Not sure why it occurs, but this fix seems to solve it.
77

88
### 0.1.21 minimap2 2.28

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ minimap2-sys is the raw FFI bindings to minimap2. minimap2 is the more opinionat
1111
# How to use
1212
## Requirements
1313
```toml
14-
minimap2 = "0.1.22+minimap2.2.28"
14+
minimap2 = "0.1.23+minimap2.2.28"
1515
```
1616
Also see [Features](#features)
1717

@@ -274,6 +274,8 @@ See [customization](#customization) for how to use these.
274274

275275
## Mapping Flags (`MM_F_*`)
276276

277+
These can be set with helper functions. Please see the docs for IdxOpt and MapOpt.
278+
277279
| Flag Constant | Value | Description |
278280
|-------------------------|----------------|-----------------------------------------------------------------|
279281
| `MM_F_NO_DIAG` | `1` | Skip seed pairs on the same diagonal. |
@@ -328,6 +330,8 @@ See [customization](#customization) for how to use these.
328330

329331
## Indexing Flags (`MM_I_*`)
330332

333+
These can be set with helper functions. Please see the docs for IdxOpt and MapOpt.
334+
331335
| Flag Constant | Value | Description |
332336
|-------------------|--------|----------------------------------------------------------|
333337
| `MM_I_HPC` | `1` | Use homopolymer-compressed k-mers for indexing. |

minimap2-sys/Cargo.lock

Lines changed: 27 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

minimap2-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pkg-config = "0.3"
4141

4242
[build-dependencies.bindgen]
4343
optional = true
44-
version = "0.70"
44+
version = "0.71"
4545
default-features = false
4646
features = ["which-rustfmt", "runtime"]
4747

minimap2-sys/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Use this if you need lower-level bindings for minimap2.
55
Minimap2 2.28
66

77
## Breaking Changes
8-
### 0.0.18
8+
### 0.1.18
99
mm2-fast and minimap2 have diverged. At this point mm2-fast is no longer supported. Please use a previous crate version.
1010

1111
## Features
@@ -20,7 +20,8 @@ mm2-fast and minimap2 have diverged. At this point mm2-fast is no longer support
2020

2121
## Changelog
2222
### 0.1.21 minimap2.2.28
23-
Syntactic sugar for mm_idx_t to support Drop, Deref, and DerefMut
23+
* Flag functions for IdxOpt and MapOpt @dwpeng
24+
* Syntactic sugar for mm_idx_t to support Drop, Deref, and DerefMut
2425

2526
### 0.1.20 minimap2.2.28
2627
* Move Drop impl to -sys crate

minimap2-sys/src/lib.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ impl Default for mm_mapopt_t {
6262
}
6363
}
6464

65+
impl Default for mm_idxopt_t {
66+
fn default() -> Self {
67+
unsafe {
68+
let mut opt = MaybeUninit::uninit();
69+
mm_idxopt_init(opt.as_mut_ptr());
70+
opt.assume_init()
71+
}
72+
}
73+
}
6574

6675
macro_rules! add_flag_methods {
6776
($ty:ty, $struct_name:ident, $(($set_name:ident, $unset_name:ident, $flag:expr)),+) => {
@@ -136,16 +145,6 @@ add_flag_methods!(
136145
(set_no_name, unset_no_name, MM_I_NO_NAME)
137146
);
138147

139-
impl Default for mm_idxopt_t {
140-
fn default() -> Self {
141-
unsafe {
142-
let mut opt = MaybeUninit::uninit();
143-
mm_idxopt_init(opt.as_mut_ptr());
144-
opt.assume_init()
145-
}
146-
}
147-
}
148-
149148
// TODO: Add more tests!
150149
#[cfg(test)]
151150
mod tests {

0 commit comments

Comments
 (0)