Skip to content

Commit

Permalink
vcf/record/position: Implement From<core::Position> for Position
Browse files Browse the repository at this point in the history
  • Loading branch information
zaeleus committed Aug 4, 2023
1 parent 8a7b6a2 commit 5da3404
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions noodles-vcf/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* vcf/record/position: Implement `PartialEq<core::Position>` and
`PartialOrd<core::Position>` for `Position` ([#191]).

* vcf/record/position: Implement `From<core::Position>` for `Position`.

[#191]: https://github.com/zaeleus/noodles/issues/191

## 0.35.0 - 2023-08-03
Expand Down
6 changes: 6 additions & 0 deletions noodles-vcf/src/record/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ impl From<usize> for Position {
}
}

impl From<core::Position> for Position {
fn from(position: core::Position) -> Self {
Self::from(usize::from(position))
}
}

impl From<Position> for usize {
fn from(position: Position) -> Self {
position.0
Expand Down

0 comments on commit 5da3404

Please sign in to comment.