Upgrade to rust 1.41.0 (bp #8202) (#8219)

automerge
This commit is contained in:
mergify[bot]
2020-02-11 13:56:58 -08:00
committed by GitHub
parent 70089a5258
commit 79035bdbed
8 changed files with 6 additions and 26 deletions

View File

@@ -57,7 +57,7 @@ pub const MAX_TRANSACTION_FORWARDING_DELAY: usize = 6;
/// Converts a slot to a storage segment. Does not indicate that a segment is complete.
pub fn get_segment_from_slot(rooted_slot: Slot, slots_per_segment: u64) -> Segment {
((rooted_slot + (slots_per_segment - 1)) / slots_per_segment)
(rooted_slot + (slots_per_segment - 1)) / slots_per_segment
}
/// Given a slot returns the latest complete segment, if no segment could possibly be complete

View File

@@ -71,7 +71,7 @@ pub unsafe fn deserialize<'a>(input: *mut u8) -> (&'a Pubkey, Vec<AccountInfo<'a
let is_signer = {
#[allow(clippy::cast_ptr_alignment)]
let is_signer = *(input.add(offset) as *const u64);
(is_signer != 0)
is_signer != 0
};
offset += size_of::<u64>();

View File

@@ -1,6 +1,5 @@
//! The `hash` module provides functions for creating SHA-256 hashes.
use bs58;
use sha2::{Digest, Sha256};
use std::convert::TryFrom;
use std::fmt;
@@ -100,7 +99,6 @@ pub fn extend_and_hash(id: &Hash, val: &[u8]) -> Hash {
#[cfg(test)]
mod tests {
use super::*;
use bs58;
#[test]
fn test_hash_fromstr() {