Upgrade to Rust 1.34.0 (#3781)
* Upgrade to Rust 1.34.0 * Remove redundant closures Thanks Clippy!
This commit is contained in:
parent
3e1214a871
commit
80f3568062
|
@ -44,7 +44,7 @@ $ source $HOME/.cargo/env
|
|||
$ rustup component add rustfmt-preview
|
||||
```
|
||||
|
||||
If your rustc version is lower than 1.33.0, please update it:
|
||||
If your rustc version is lower than 1.34.0, please update it:
|
||||
|
||||
```bash
|
||||
$ rustup update
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Note: when the rust version is changed also modify
|
||||
# ci/buildkite.yml to pick up the new image tag
|
||||
FROM rust:1.33.0
|
||||
FROM rust:1.34.0
|
||||
|
||||
RUN set -x \
|
||||
&& apt update \
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# $ source ci/rust-version.sh
|
||||
#
|
||||
|
||||
export rust_stable=1.33.0
|
||||
export rust_stable_docker_image=solanalabs/rust:1.33.0
|
||||
export rust_stable=1.34.0
|
||||
export rust_stable_docker_image=solanalabs/rust:1.34.0
|
||||
|
||||
export rust_nightly=nightly-2019-03-14
|
||||
export rust_nightly_docker_image=solanalabs/rust-nightly:2019-03-14
|
||||
|
|
|
@ -227,7 +227,7 @@ impl ClusterInfo {
|
|||
self.gossip
|
||||
.crds
|
||||
.lookup(&entry)
|
||||
.and_then(|x| x.contact_info())
|
||||
.and_then(CrdsValue::contact_info)
|
||||
}
|
||||
|
||||
pub fn my_data(&self) -> ContactInfo {
|
||||
|
@ -847,7 +847,7 @@ impl ClusterInfo {
|
|||
self.gossip
|
||||
.crds
|
||||
.lookup(&peer_label)
|
||||
.and_then(|v| v.contact_info())
|
||||
.and_then(CrdsValue::contact_info)
|
||||
.map(|peer_info| (peer, filter, peer_info.gossip, self_info))
|
||||
})
|
||||
.collect();
|
||||
|
@ -873,7 +873,7 @@ impl ClusterInfo {
|
|||
self.gossip
|
||||
.crds
|
||||
.lookup(&peer_label)
|
||||
.and_then(|v| v.contact_info())
|
||||
.and_then(CrdsValue::contact_info)
|
||||
.map(|p| p.gossip)
|
||||
})
|
||||
.map(|peer| (peer, Protocol::PushMessage(self_id, msgs.clone())))
|
||||
|
|
|
@ -265,7 +265,7 @@ impl EntrySlice for [Entry] {
|
|||
}
|
||||
|
||||
fn to_single_entry_blobs(&self) -> Vec<Blob> {
|
||||
self.iter().map(|entry| entry.to_blob()).collect()
|
||||
self.iter().map(Entry::to_blob).collect()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ fn main() {
|
|||
(Some(signer_service), signer_addr)
|
||||
};
|
||||
let init_complete_file = matches.value_of("init_complete_file");
|
||||
fullnode_config.blockstream = matches.value_of("blockstream").map(|s| s.to_string());
|
||||
fullnode_config.blockstream = matches.value_of("blockstream").map(ToString::to_string);
|
||||
|
||||
let keypair = Arc::new(keypair);
|
||||
let mut node = Node::new_with_external_ip(&keypair.pubkey(), &gossip_addr, dynamic_port_range);
|
||||
|
|
|
@ -213,7 +213,7 @@ fn main() -> Result<(), String> {
|
|||
let program_name = matches.value_of("program_name").unwrap();
|
||||
let program_arguments = matches
|
||||
.values_of("program_arguments")
|
||||
.map(|iter| iter.collect())
|
||||
.map(Iterator::collect)
|
||||
.unwrap_or_else(|| vec![]);
|
||||
|
||||
command::run(config_file, program_name, program_arguments)
|
||||
|
|
|
@ -214,7 +214,7 @@ pub struct Accounts {
|
|||
}
|
||||
|
||||
fn get_paths_vec(paths: &str) -> Vec<String> {
|
||||
paths.split(',').map(|s| s.to_string()).collect()
|
||||
paths.split(',').map(ToString::to_string).collect()
|
||||
}
|
||||
|
||||
impl Drop for Accounts {
|
||||
|
|
|
@ -109,7 +109,7 @@ impl Transaction {
|
|||
) -> Self {
|
||||
let mut account_keys: Vec<_> = from_keypairs
|
||||
.iter()
|
||||
.map(|keypair| keypair.pubkey())
|
||||
.map(|keypair| (*keypair).pubkey())
|
||||
.collect();
|
||||
account_keys.extend_from_slice(keys);
|
||||
let message = Message::new_with_compiled_instructions(
|
||||
|
|
Loading…
Reference in New Issue