mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-12-28 03:45:06 +00:00
Fix clippy lints
This commit is contained in:
parent
8d9f0f1146
commit
eaf63bcc69
2
.github/workflows/cargo-clippy.yml
vendored
2
.github/workflows/cargo-clippy.yml
vendored
@ -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 }}
|
||||
|
3
.github/workflows/cargo-test.yml
vendored
3
.github/workflows/cargo-test.yml
vendored
@ -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:
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user