fix clippy warnings

I don't know why these are "intermittent"
This commit is contained in:
Dustin J. Mitchell 2020-11-26 22:36:31 -05:00
parent 26b17c6dbc
commit 2064057688
3 changed files with 4 additions and 4 deletions

View file

@ -138,7 +138,7 @@ impl<'t> Server for LocalServer<'t> {
Ok(GetVersionResult::Version {
version_id: version.version_id,
parent_version_id: version.parent_version_id,
history_segment: version.history_segment.clone(),
history_segment: version.history_segment,
})
} else {
Ok(GetVersionResult::NoSuchVersion)

View file

@ -82,7 +82,7 @@ impl<'t> TaskStorageTxn for Txn<'t> {
}
fn base_version(&mut self) -> Fallible<VersionId> {
Ok(self.data_ref().base_version.clone())
Ok(self.data_ref().base_version)
}
fn set_base_version(&mut self, version: VersionId) -> Fallible<()> {
@ -140,7 +140,7 @@ impl InMemoryStorage {
InMemoryStorage {
data: Data {
tasks: HashMap::new(),
base_version: DEFAULT_BASE_VERSION.into(),
base_version: DEFAULT_BASE_VERSION,
operations: vec![],
working_set: vec![None],
},

View file

@ -171,7 +171,7 @@ impl<'t> TaskStorageTxn for Txn<'t> {
let bucket = self.uuids_bucket();
let base_version = match self.kvtxn().get(bucket, BASE_VERSION.into()) {
Ok(buf) => buf,
Err(Error::NotFound) => return Ok(DEFAULT_BASE_VERSION.into()),
Err(Error::NotFound) => return Ok(DEFAULT_BASE_VERSION),
Err(e) => return Err(e.into()),
}
.inner()?