Fix clippy lints

This commit is contained in:
Ajeet D'Souza 2020-10-02 02:14:48 +05:30
parent 8d9f0f1146
commit eaf63bcc69
3 changed files with 6 additions and 6 deletions

View File

@ -17,5 +17,5 @@ jobs:
components: clippy
- uses: actions-rs/clippy-check@v1
with:
args: --workspace --all-targets --all-features -- -D clippy::all
args: --workspace --all-targets --all-features -- -D warnings -D clippy::all
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -8,6 +8,9 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- run: sudo apt update
- run: sudo apt install bash dash fish shellcheck xonsh zsh
- run: sudo snap install powershell --classic
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:

View File

@ -84,9 +84,8 @@ impl Query {
let now = util::get_current_time()?;
let mut fzf = Fzf::new()?;
let mut matches = db.matches(now, &self.keywords);
while let Some(dir) = matches.next() {
for dir in db.matches(now, &self.keywords) {
fzf.write(format!("{}", dir.display_score(now)))?;
}
@ -111,12 +110,10 @@ impl Query {
let mut db = util::get_db()?;
let now = util::get_current_time()?;
let mut matches = db.matches(now, &self.keywords);
let stdout = io::stdout();
let mut handle = stdout.lock();
while let Some(dir) = matches.next() {
for dir in db.matches(now, &self.keywords) {
if self.score {
writeln!(handle, "{}", dir.display_score(now))
} else {