Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to 2018 edition #24

Merged
merged 6 commits into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
Expand All @@ -85,11 +93,19 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: stable
override: true

- name: Install cargo-tarpaulin
Expand Down
158 changes: 158 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ repository = "https://github.com/rust-bio/rust-bio"
documentation = "https://docs.rs/bio"
readme = "README.md"
license = "MIT"
license-file = "LICENSE.md"
edition = "2018"


[dependencies]
Expand Down
8 changes: 4 additions & 4 deletions src/annot/contig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ use std::str::FromStr;

use regex::Regex;

use annot::loc::Loc;
use annot::pos::Pos;
use annot::*;
use strand::*;
use crate::annot::loc::Loc;
use crate::annot::pos::Pos;
use crate::annot::*;
use crate::strand::*;

/// Contiguous sequence region on a particular, named sequence (e.g. a
/// chromosome)
Expand Down
8 changes: 4 additions & 4 deletions src/annot/loc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

use std::ops::Neg;

use annot::contig::Contig;
use annot::pos::Pos;
use crate::annot::contig::Contig;
use crate::annot::pos::Pos;

use strand::*;
use crate::strand::*;

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

fn contig_intersection<T>(&self, &Contig<Self::RefID, T>) -> Option<Self>
fn contig_intersection<T>(&self, other: &Contig<Self::RefID, T>) -> Option<Self>
where
Self: ::std::marker::Sized,
Self::RefID: PartialEq + Clone,
Expand Down
2 changes: 1 addition & 1 deletion src/annot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
//! # fn main() { try_main().unwrap(); }
//! ```

use strand;
use crate::strand;

pub mod contig;
pub mod loc;
Expand Down
8 changes: 4 additions & 4 deletions src/annot/pos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ use std::str::FromStr;

use regex::Regex;

use annot::contig::Contig;
use annot::loc::Loc;
use annot::*;
use strand::*;
use crate::annot::contig::Contig;
use crate::annot::loc::Loc;
use crate::annot::*;
use crate::strand::*;

/// Position on a particular, named sequence (e.g. a chromosome).
///
Expand Down
10 changes: 5 additions & 5 deletions src/annot/spliced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ use std::str::FromStr;

use regex::Regex;

use annot::contig::Contig;
use annot::loc::Loc;
use annot::pos::Pos;
use annot::*;
use strand::*;
use crate::annot::contig::Contig;
use crate::annot::loc::Loc;
use crate::annot::pos::Pos;
use crate::annot::*;
use crate::strand::*;

// The spliced location representation inherently cannot represent
// "bad" splicing structures. Locations comprise a first exon length,
Expand Down
2 changes: 1 addition & 1 deletion src/strand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl Display for NoStrand {
pub trait Same {
/// Indicate when two strands are the "same" -- two
/// unknown/unspecified strands are the "same" but are not equal.
fn same(&self, &Self) -> bool;
fn same(&self, other: &Self) -> bool;
}

impl<T> Same for Option<T>
Expand Down
4 changes: 2 additions & 2 deletions src/variant.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use genome;
use sequence::{Base, Sequence};
use crate::genome;
use crate::sequence::{Base, Sequence};

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