Skip to content

Commit 8b71a8b

Browse files
update to 2018 edition (#24)
* make serde optional * update to 2018 edition * try to cache * fixes * add lock Co-authored-by: Johannes Köster <[email protected]>
1 parent da5206f commit 8b71a8b

File tree

10 files changed

+198
-22
lines changed

10 files changed

+198
-22
lines changed

.github/workflows/rust.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ jobs:
6262
- name: Checkout repository
6363
uses: actions/checkout@v2
6464

65+
- uses: actions/cache@v2
66+
with:
67+
path: |
68+
~/.cargo/registry
69+
~/.cargo/git
70+
target
71+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
72+
6573
- uses: actions-rs/toolchain@v1
6674
with:
6775
toolchain: ${{ matrix.rust }}
@@ -85,11 +93,19 @@ jobs:
8593
steps:
8694
- name: Checkout repository
8795
uses: actions/checkout@v2
96+
97+
- uses: actions/cache@v2
98+
with:
99+
path: |
100+
~/.cargo/registry
101+
~/.cargo/git
102+
target
103+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
88104

89105
- name: Install nightly toolchain
90106
uses: actions-rs/toolchain@v1
91107
with:
92-
toolchain: nightly
108+
toolchain: stable
93109
override: true
94110

95111
- name: Install cargo-tarpaulin

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ repository = "https://github.com/rust-bio/rust-bio"
88
documentation = "https://docs.rs/bio"
99
readme = "README.md"
1010
license = "MIT"
11+
license-file = "LICENSE.md"
12+
edition = "2018"
1113

1214

1315
[dependencies]

src/annot/contig.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ use std::str::FromStr;
1414

1515
use regex::Regex;
1616

17-
use annot::loc::Loc;
18-
use annot::pos::Pos;
19-
use annot::*;
20-
use strand::*;
17+
use crate::annot::loc::Loc;
18+
use crate::annot::pos::Pos;
19+
use crate::annot::*;
20+
use crate::strand::*;
2121

2222
/// Contiguous sequence region on a particular, named sequence (e.g. a
2323
/// chromosome)

src/annot/loc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
99
use std::ops::Neg;
1010

11-
use annot::contig::Contig;
12-
use annot::pos::Pos;
11+
use crate::annot::contig::Contig;
12+
use crate::annot::pos::Pos;
1313

14-
use strand::*;
14+
use crate::strand::*;
1515

1616
/// A trait for a sequence location -- a defined region on a named
1717
/// chromosome (or other reference sequence), which may also have
@@ -80,7 +80,7 @@ pub trait Loc {
8080
Self::Strand: Into<ReqStrand> + Copy,
8181
T: Neg<Output = T> + Copy;
8282

83-
fn contig_intersection<T>(&self, &Contig<Self::RefID, T>) -> Option<Self>
83+
fn contig_intersection<T>(&self, other: &Contig<Self::RefID, T>) -> Option<Self>
8484
where
8585
Self: ::std::marker::Sized,
8686
Self::RefID: PartialEq + Clone,

src/annot/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
//! # fn main() { try_main().unwrap(); }
4545
//! ```
4646
47-
use strand;
47+
use crate::strand;
4848

4949
pub mod contig;
5050
pub mod loc;

src/annot/pos.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ use std::str::FromStr;
1414

1515
use regex::Regex;
1616

17-
use annot::contig::Contig;
18-
use annot::loc::Loc;
19-
use annot::*;
20-
use strand::*;
17+
use crate::annot::contig::Contig;
18+
use crate::annot::loc::Loc;
19+
use crate::annot::*;
20+
use crate::strand::*;
2121

2222
/// Position on a particular, named sequence (e.g. a chromosome).
2323
///

src/annot/spliced.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ use std::str::FromStr;
1515

1616
use regex::Regex;
1717

18-
use annot::contig::Contig;
19-
use annot::loc::Loc;
20-
use annot::pos::Pos;
21-
use annot::*;
22-
use strand::*;
18+
use crate::annot::contig::Contig;
19+
use crate::annot::loc::Loc;
20+
use crate::annot::pos::Pos;
21+
use crate::annot::*;
22+
use crate::strand::*;
2323

2424
// The spliced location representation inherently cannot represent
2525
// "bad" splicing structures. Locations comprise a first exon length,

src/strand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ impl Display for NoStrand {
281281
pub trait Same {
282282
/// Indicate when two strands are the "same" -- two
283283
/// unknown/unspecified strands are the "same" but are not equal.
284-
fn same(&self, &Self) -> bool;
284+
fn same(&self, other: &Self) -> bool;
285285
}
286286

287287
impl<T> Same for Option<T>

src/variant.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use genome;
2-
use sequence::{Base, Sequence};
1+
use crate::genome;
2+
use crate::sequence::{Base, Sequence};
33

44
#[cfg(feature = "serde")]
55
use serde::{Deserialize, Serialize};

0 commit comments

Comments
 (0)