Skip to content

Commit

Permalink
Run formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
stijndcl committed Feb 3, 2024
1 parent b1c5231 commit 293bcb7
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions scripts/helper_scripts/unipept-database-rs/src/dat_parser/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,7 @@ fn parse_version(data: &[String], index: &mut usize) -> String {
/// - Last submitted name of protein components
/// - Last submitted name of protein domains
/// - Submitted name of protein itself
fn parse_name_and_ec(
data: &mut [String],
index: &mut usize,
) -> (String, Vec<String>) {
fn parse_name_and_ec(data: &mut [String], index: &mut usize) -> (String, Vec<String>) {
// Find where the info starts and ends
while !data[*index].starts_with("DE") {
*index += 1;
Expand Down Expand Up @@ -175,10 +172,7 @@ fn parse_name_and_ec(
}
// Find EC numbers
else if line.starts_with("EC=") {
let ec_target = read_until_metadata(
line,
ORGANISM_RECOMMENDED_NAME_EC_PREFIX_LEN,
);
let ec_target = read_until_metadata(line, ORGANISM_RECOMMENDED_NAME_EC_PREFIX_LEN);

// EC numbers sometimes appear multiple times, so use a set to track which ones
// we've seen before
Expand Down Expand Up @@ -232,10 +226,7 @@ fn parse_taxon_id(data: &mut [String], index: &mut usize) -> String {
}

/// Parse GO and InterPro DB references
fn parse_db_references(
data: &mut Vec<String>,
index: &mut usize,
) -> (Vec<String>, Vec<String>) {
fn parse_db_references(data: &mut Vec<String>, index: &mut usize) -> (Vec<String>, Vec<String>) {
let mut go_references = Vec::new();
let mut ip_references = Vec::new();
let original_idx = *index;
Expand Down

0 comments on commit 293bcb7

Please sign in to comment.