Skip to content

Commit a07711a

Browse files
committed
Bump version to 0.3.0-beta13
This also cleans up some clippy lints
1 parent 01511c6 commit a07711a

File tree

9 files changed

+17
-27
lines changed

9 files changed

+17
-27
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- stable
1919
- beta
2020
- nightly
21-
- "1.63.0"
21+
- "1.71.1"
2222
steps:
2323
- name: Checkout repository
2424
uses: actions/checkout@v1

clippy.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

interop-tests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ futures-executor = "0.3.1"
1717
serde = "1"
1818
serde_derive = "1"
1919
serde_json = "1"
20-
tuf = { version = "0.3.0-beta12", path = "../tuf" }
20+
tuf = { path = "../tuf" }
2121
walkdir = "2.3.2"
2222

2323
[dev-dependencies]

tuf/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[package]
22
name = "tuf"
33
edition = "2021"
4-
version = "0.3.0-beta12"
4+
version = "0.3.0-beta13"
5+
rust-version = "1.71.1"
56
authors = [ "heartsucker <[email protected]>", "Erick Tryzelaar <[email protected]>" ]
67
description = "Library for The Update Framework (TUF)"
78
homepage = "https://github.com/theupdateframework/rust-tuf"

tuf/src/crypto.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,16 +1269,11 @@ mod test {
12691269
}
12701270

12711271
fn check_public_key_hash(key1: &PublicKey, key2: &PublicKey) {
1272-
use std::hash::{BuildHasher, Hash, Hasher};
1272+
use std::hash::BuildHasher;
12731273

12741274
let state = std::collections::hash_map::RandomState::new();
1275-
let mut hasher1 = state.build_hasher();
1276-
key1.hash(&mut hasher1);
12771275

1278-
let mut hasher2 = state.build_hasher();
1279-
key2.hash(&mut hasher2);
1280-
1281-
assert_ne!(hasher1.finish(), hasher2.finish());
1276+
assert_ne!(state.hash_one(key1), state.hash_one(key2));
12821277
}
12831278

12841279
#[test]

tuf/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
//! actually implement TUF for a community repository.
1212
//!
1313
//! - [The Diplomat paper
14-
//! (2016)](https://www.usenix.org/conference/nsdi16/technical-sessions/presentation/kuppusamy)
14+
//! (2016)](https://www.usenix.org/conference/nsdi16/technical-sessions/presentation/kuppusamy)
1515
//! - [The Mercury paper
16-
//! (2017)](https://www.usenix.org/conference/atc17/technical-sessions/presentation/kuppusamy)
16+
//! (2017)](https://www.usenix.org/conference/atc17/technical-sessions/presentation/kuppusamy)
1717
//!
1818
//! Failure to read the spec and the above papers will likely lead to an implementation that does
1919
//! not take advantage of all the security guarantees that TUF offers.
@@ -81,11 +81,11 @@
8181
//! 2. `rarely-updated-projects`
8282
//! - Terminating
8383
//! - Signs all packages for all projects that have been "abandoned" or left unupdated for a long
84-
//! time AND have not yet registered keys with TUF
84+
//! time AND have not yet registered keys with TUF
8585
//! 3. `new-projects`
8686
//! - Non-terminating
8787
//! - Signs all packages for all new projects as well as projects that were relegated to
88-
//! `rarely-updated-projects`
88+
//! `rarely-updated-projects`
8989
//!
9090
//! The top-level `targets` role as well as `claimed-projects` and `rarely-updated-projects`
9191
//! **MUST** all use offline keys.

tuf/src/metadata.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,10 @@ where
483483
/// hash of the returned bytes will match a hash included in, for example, a snapshot metadata
484484
/// file, as:
485485
/// * Parsing metadata removes unknown fields, which would not be included in the returned
486-
/// bytes,
486+
/// bytes,
487487
/// * [Pouf] implementations only guarantee the bytes are canonical for the purpose of a
488-
/// signature. Metadata obtained from a remote source may have included different whitespace
489-
/// or ordered fields in a way that is not preserved when parsing that metadata.
488+
/// signature. Metadata obtained from a remote source may have included different whitespace
489+
/// or ordered fields in a way that is not preserved when parsing that metadata.
490490
pub fn to_raw(&self) -> Result<RawSignedMetadata<D, M>> {
491491
let bytes = D::canonicalize(&D::serialize(self)?)?;
492492
Ok(RawSignedMetadata::new(bytes))

tuf/src/repo_builder.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ where
227227
_pouf: PhantomData<D>,
228228
}
229229

230-
impl<'a, D, R> RepoContext<'a, D, R>
230+
impl<D, R> RepoContext<'_, D, R>
231231
where
232232
D: Pouf,
233233
R: RepositoryStorage<D>,
@@ -293,11 +293,7 @@ where
293293

294294
/// The initial version number for non-root metadata.
295295
fn non_root_initial_version(&self) -> u32 {
296-
if let Some(time_version) = self.time_version {
297-
time_version
298-
} else {
299-
1
300-
}
296+
self.time_version.unwrap_or(1)
301297
}
302298

303299
/// If time versioning is enabled, this updates the current time version to match the current
@@ -1410,7 +1406,7 @@ where
14101406
}
14111407
}
14121408

1413-
impl<'a, D, R> RepoBuilder<'a, D, R, Done<D>>
1409+
impl<D, R> RepoBuilder<'_, D, R, Done<D>>
14141410
where
14151411
D: Pouf,
14161412
R: RepositoryStorage<D>,

tuf/src/repository/file_system.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ pub enum CommitError {
334334
},
335335
}
336336

337-
impl<'a, D> FileSystemBatchUpdate<'a, D>
337+
impl<D> FileSystemBatchUpdate<'_, D>
338338
where
339339
D: Pouf,
340340
{

0 commit comments

Comments
 (0)