Skip to content

Commit

Permalink
Merge pull request #780 from jpculp/rust-bump
Browse files Browse the repository at this point in the history
Bump rust to 1.78.0 in actions runner
  • Loading branch information
jpculp authored Jul 19, 2024
2 parents a1cc6cb + a313b9f commit 8fb4469
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [develop]

env:
# From-scratch builds with incremental compilation enabled adds unneeded performance and disk overhead.
# From-scratch builds with incremental compilation enabled adds unneeded performance and disk overhead.
CARGO_INCREMENTAL: "0"

jobs:
Expand All @@ -33,7 +33,7 @@ jobs:
key: ${{ hashFiles('.github/cache_bust') }}-${{ runner.os }}-${{ matrix.make_target }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ hashFiles('.github/cache_bust') }}-${{ runner.os }}-${{ matrix.make_target }}
- run: rustup default 1.76.0
- run: rustup default 1.78.0
- run: rustup component add rustfmt
- run: rustup component add clippy
- run: make ${{ matrix.make_target }}
4 changes: 2 additions & 2 deletions tough-kms/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub struct KmsKeySource {
pub profile: Option<String>,
/// Identifies an asymmetric CMK in AWS KMS.
pub key_id: String,
/// KmsClient Object to query AWS KMS
/// `KmsClient` Object to query AWS KMS
pub client: Option<KmsClient>,
/// Signing Algorithm to be used for the message digest, only `KmsSigningAlgorithm::RsassaPssSha256` is supported at present.
pub signing_algorithm: KmsSigningAlgorithm,
Expand Down Expand Up @@ -146,7 +146,7 @@ pub struct KmsRsaKey {
key_id: String,
/// Aws account profile
profile: Option<String>,
/// KmsClient Object to query AWS KMS
/// `KmsClient` Object to query AWS KMS
client: Option<KmsClient>,
/// Public Key corresponding to Customer Managed Key
public_key: Decoded<RsaPem>,
Expand Down
2 changes: 1 addition & 1 deletion tough/src/datastore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use tokio::sync::{Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard};
pub(crate) struct Datastore {
/// A lock around retrieving the datastore path.
path_lock: Arc<RwLock<DatastorePath>>,
/// A lock to treat the system_time function as a critical section.
/// A lock to treat the `system_time` function as a critical section.
time_lock: Arc<Mutex<()>>,
}

Expand Down
4 changes: 2 additions & 2 deletions tough/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,15 +612,15 @@ pub enum Error {
source: schema::Error,
},

/// SignedDelegatedTargets has more than 1 signed targets
/// `SignedDelegatedTargets` has more than 1 signed targets
#[snafu(display("Exactly 1 role was required, but {} were created", count))]
InvalidRoleCount { count: usize },

/// Could not create a targets map
#[snafu(display("Could not create a targets map: {}", source))]
TargetsMap { source: schema::Error },

/// A key_holder wasn't set
/// A `key_holder` wasn't set
#[snafu(display("A key holder must be set"))]
NoKeyHolder,

Expand Down
4 changes: 2 additions & 2 deletions tough/src/schema/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub enum Key {
#[serde(flatten)]
_extra: HashMap<String, Value>,
},
/// An EcdsaKey.
/// An Ecdsa key.
Ecdsa {
/// The Ecdsa key.
keyval: EcdsaKey,
Expand All @@ -67,7 +67,7 @@ pub enum Key {
#[serde(flatten)]
_extra: HashMap<String, Value>,
},
/// An EcdsaKey with the old key type.
/// An Ecdsa key with the old key type.
#[serde(rename = "ecdsa-sha2-nistp256")]
EcdsaOld {
/// The Ecdsa key.
Expand Down
14 changes: 7 additions & 7 deletions tough/src/schema/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::used_underscore_binding)] // #20
#![allow(clippy::used_underscore_binding, clippy::pub_underscore_fields)] // #20

//! Provides the schema objects as defined by the TUF spec.
Expand Down Expand Up @@ -61,7 +61,7 @@ derive_fromstr_from_deserialize!(RoleType);
/// A role identifier
#[derive(Debug, Clone)]
pub enum RoleId {
/// Top level roles are identified by a RoleType
/// Top level roles are identified by a `RoleType`
StandardRole(RoleType),
/// A delegated role is identified by a String
DelegatedRole(String),
Expand Down Expand Up @@ -898,12 +898,12 @@ pub enum PathSet {
#[serde(rename = "paths")]
Paths(Vec<PathPattern>),

/// The "path_hash_prefixes" list is used to succinctly describe a set of target paths.
/// Specifically, each HEX_DIGEST in "path_hash_prefixes" describes a set of target paths;
/// therefore, "path_hash_prefixes" is the union over each prefix of its set of target paths.
/// The `path_hash_prefixes` list is used to succinctly describe a set of target paths.
/// Specifically, each `HEX_DIGEST` in `path_hash_prefixes` describes a set of target paths;
/// therefore, `path_hash_prefixes` is the union over each prefix of its set of target paths.
/// The target paths must meet this condition: each target path, when hashed with the SHA-256
/// hash function to produce a 64-byte hexadecimal digest (HEX_DIGEST), must share the same
/// prefix as one of the prefixes in "path_hash_prefixes". This is useful to split a large
/// hash function to produce a 64-byte hexadecimal digest (`HEX_DIGEST`), must share the same
/// prefix as one of the prefixes in `path_hash_prefixes`. This is useful to split a large
/// number of targets into separate bins identified by consistent hashing.
#[serde(rename = "path_hash_prefixes")]
PathHashPrefixes(Vec<PathHashPrefix>),
Expand Down
28 changes: 0 additions & 28 deletions tuftool/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ pub(crate) enum Error {
backtrace: Backtrace,
},

#[snafu(display("Can't build URL from path '{}'", path.display()))]
FileUrl { path: PathBuf, backtrace: Backtrace },

#[snafu(display("Failed to write to {}: {}", path.display(), source))]
FileWrite {
path: PathBuf,
Expand Down Expand Up @@ -295,25 +292,6 @@ pub(crate) enum Error {
backtrace: Backtrace,
},

#[snafu(display("Failed to add targets from directory '{}': {}", dir.display(), source))]
TargetsFromDir {
dir: PathBuf,
source: tough::error::Error,
backtrace: Backtrace,
},

#[snafu(display("Target not found: {}", target))]
TargetNotFound {
target: String,
backtrace: Backtrace,
},

#[snafu(display("Failed to create temporary directory: {}", source))]
TempDir {
source: std::io::Error,
backtrace: Backtrace,
},

#[snafu(display("Unrecognized URL scheme \"{}\"", scheme))]
UnrecognizedScheme {
scheme: String,
Expand Down Expand Up @@ -373,12 +351,6 @@ pub(crate) enum Error {
backtrace: Backtrace,
},

#[snafu(display("Failed writing target data to disk: {}", source))]
WriteTarget {
source: std::io::Error,
backtrace: Backtrace,
},

#[snafu(display("Failed to join a task: {}", source))]
JoinTask {
source: tokio::task::JoinError,
Expand Down

0 comments on commit 8fb4469

Please sign in to comment.