Skip to content

Commit

Permalink
round two preliminaries for bumping nightly to 2023-08-25 (#33064)
Browse files Browse the repository at this point in the history
* work around nightly ICE

seems to be something related to `const ref`s in generic contexts...

* allow lint false-positive on ignored trait bounds
  • Loading branch information
t-nelson committed Aug 30, 2023
1 parent 79c02c8 commit b13589b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions clap-v3-utils/src/keypair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,8 @@ pub fn keypair_from_path(
keypair_name: &str,
confirm_pubkey: bool,
) -> Result<Keypair, Box<dyn error::Error>> {
let keypair = encodable_key_from_path(matches, path, keypair_name)?;
let skip_validation = matches.is_present(SKIP_SEED_PHRASE_VALIDATION_ARG.name);
let keypair = encodable_key_from_path(path, keypair_name, skip_validation)?;
if confirm_pubkey {
confirm_encodable_keypair_pubkey(&keypair, "pubkey");
}
Expand Down Expand Up @@ -1051,7 +1052,8 @@ pub fn elgamal_keypair_from_path(
elgamal_keypair_name: &str,
confirm_pubkey: bool,
) -> Result<ElGamalKeypair, Box<dyn error::Error>> {
let elgamal_keypair = encodable_key_from_path(matches, path, elgamal_keypair_name)?;
let skip_validation = matches.is_present(SKIP_SEED_PHRASE_VALIDATION_ARG.name);
let elgamal_keypair = encodable_key_from_path(path, elgamal_keypair_name, skip_validation)?;
if confirm_pubkey {
confirm_encodable_keypair_pubkey(&elgamal_keypair, "ElGamal pubkey");
}
Expand Down Expand Up @@ -1105,29 +1107,27 @@ pub fn ae_key_from_path(
path: &str,
key_name: &str,
) -> Result<AeKey, Box<dyn error::Error>> {
encodable_key_from_path(matches, path, key_name)
let skip_validation = matches.is_present(SKIP_SEED_PHRASE_VALIDATION_ARG.name);
encodable_key_from_path(path, key_name, skip_validation)
}

fn encodable_key_from_path<K: EncodableKey + SeedDerivable>(
matches: &ArgMatches,
path: &str,
keypair_name: &str,
skip_validation: bool,
) -> Result<K, Box<dyn error::Error>> {
let SignerSource {
kind,
derivation_path,
legacy,
} = parse_signer_source(path)?;
match kind {
SignerSourceKind::Prompt => {
let skip_validation = matches.is_present(SKIP_SEED_PHRASE_VALIDATION_ARG.name);
Ok(encodable_key_from_seed_phrase(
keypair_name,
skip_validation,
derivation_path,
legacy,
)?)
}
SignerSourceKind::Prompt => Ok(encodable_key_from_seed_phrase(
keypair_name,
skip_validation,
derivation_path,
legacy,
)?),
SignerSourceKind::Filepath(path) => match K::read_from_file(&path) {
Err(e) => Err(std::io::Error::new(
std::io::ErrorKind::Other,
Expand Down
1 change: 1 addition & 0 deletions gossip/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ num-traits = { workspace = true }
rand = { workspace = true }
rand_chacha = { workspace = true }
rayon = { workspace = true }
rustversion = { workspace = true }
serde = { workspace = true }
serde_bytes = { workspace = true }
serde_derive = { workspace = true }
Expand Down
4 changes: 4 additions & 0 deletions gossip/src/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1972,6 +1972,10 @@ impl ClusterInfo {
// Returns a predicate checking if the pull request is from a valid
// address, and if the address have responded to a ping request. Also
// appends ping packets for the addresses which need to be (re)verified.
//
// allow lint false positive trait bound requirement (`CryptoRng` only
// implemented on `&'a mut T`
#[rustversion::attr(since(1.73), allow(clippy::needless_pass_by_ref_mut))]
fn check_pull_request<'a, R>(
&'a self,
now: Instant,
Expand Down
1 change: 1 addition & 0 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b13589b

Please sign in to comment.