ci: enable clippy lints (#1335)

This commit is contained in:
Taiki Endo
2019-07-26 03:47:14 +09:00
committed by GitHub
parent f311ac3d4f
commit fe021e6c00
54 changed files with 394 additions and 274 deletions
+2 -5
View File
@@ -93,10 +93,7 @@ impl BackupStack {
/// * `Err(_)` is returned if the pool has been shutdown.
pub fn pop(&self, entries: &[Backup], terminate: bool) -> Result<Option<BackupId>, ()> {
// Figure out the empty value
let terminal = match terminate {
true => TERMINATED,
false => EMPTY,
};
let terminal = if terminate { TERMINATED } else { EMPTY };
let mut state: State = self.state.load(Acquire).into();
@@ -164,7 +161,7 @@ impl State {
State(EMPTY.0)
}
fn head(&self) -> BackupId {
fn head(self) -> BackupId {
BackupId(self.0 & STACK_MASK)
}