Skip to content

Commit c99aeb0

Browse files
author
mendelsshop
committed
cargo formatted: library:
added parelel as optinal (but default feature
1 parent b588596 commit c99aeb0

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

git-function-history-lib/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use ra_ap_syntax::{
2323
#[cfg(feature = "parallel")]
2424
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
2525

26-
2726
use std::{collections::HashMap, error::Error, process::Command};
2827
pub use types::{
2928
Block, BlockType, CommitFunctions, File, Function, FunctionBlock, FunctionHistory,
@@ -572,9 +571,9 @@ fn find_function_in_commit_with_filetype(
572571
}
573572
}
574573
let err = "no function found".to_string();
575-
#[cfg(feature="parellel")]
574+
#[cfg(feature = "parellel")]
576575
let t = files.par_iter();
577-
#[cfg(not(feature="parellel"))]
576+
#[cfg(not(feature = "parellel"))]
578577
let t = files.iter();
579578
let returns: Vec<File> = t
580579
.filter_map(|file| match find_function_in_commit(commit, file, name) {

git-function-history-lib/src/types.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,7 @@ impl FunctionHistory {
649649
/// ```
650650
pub fn filter_by(&self, filter: &Filter) -> Result<Self, Box<dyn Error>> {
651651
#[cfg(feature = "parallel")]
652-
let t = self
653-
.commit_history
654-
.par_iter();
652+
let t = self.commit_history.par_iter();
655653
#[cfg(not(feature = "parallel"))]
656654
let t = self.commit_history.iter();
657655
let vec: Vec<CommitFunctions> = t

0 commit comments

Comments
 (0)