Skip to content

Commit

Permalink
Merge pull request #52 from TomasTomecek/fix-some-warnings
Browse files Browse the repository at this point in the history
fix several compiler warnings
  • Loading branch information
TomasTomecek authored Apr 6, 2020
2 parents bc314fd + bb8b713 commit 0321225
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
specfile_path: rust-pretty-git-prompt.spec
synced_files:
- rust-pretty-git-prompt.spec
- .packit.yaml
downstream_package_name: rust-pretty-git-prompt
actions:
create-archive:
- cargo publish --dry-run --allow-dirty
- bash -c "ls -1 target/package/*.crate"
5 changes: 0 additions & 5 deletions rust-pretty-git-prompt.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ Summary: Your current git repository information inside a beautiful shell
License: MIT
URL: https://crates.io/crates/pretty-git-prompt
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Bump git2 to 0.7, https://github.com/TomasTomecek/pretty-git-prompt/pull/39
Patch0: pretty-git-prompt-0.2.0-fix-metadata.diff
# Make it work with new git2
Patch1: 0001-deps-update-git2-to-0.7.patch

ExclusiveArch: %{rust_arches}

Expand Down
8 changes: 5 additions & 3 deletions src/backend.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::fmt;
use std::collections::HashMap;
use std::cell::RefCell;
use std::borrow::BorrowMut;

use constants::{CHANGED_KEY,NEW_KEY,STAGED_KEY,CONFLICTS_KEY};

Expand Down Expand Up @@ -387,12 +386,15 @@ impl Backend {

pub fn get_stash_count(&mut self) -> u16 {
let mut count: u16 = 0;
self.repo.stash_foreach(
|u: usize, s: &str, o: &Oid| {
let result = self.repo.stash_foreach(
|_u: usize, _s: &str, _o: &Oid| {
count += 1;
true
}
);
if result.is_err() {
log!(self, "Unable to get stash count from the repository: {:?}", result);
}
count
}
}

0 comments on commit 0321225

Please sign in to comment.