Skip to content

Commit

Permalink
Rollup merge of rust-lang#58318 - taiki-e:libserialize-2018, r=Centril
Browse files Browse the repository at this point in the history
libserialize => 2018

Transitions `libserialize` to Rust 2018; cc rust-lang#58099

This includes a commit from rust-lang#58252 (thanks @h-michael!)

r? @Centril
  • Loading branch information
Centril authored Feb 12, 2019
2 parents d943453 + 06b6304 commit 308c07b
Show file tree
Hide file tree
Showing 9 changed files with 1,607 additions and 1,609 deletions.
1 change: 1 addition & 0 deletions src/libserialize/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["The Rust Project Developers"]
name = "serialize"
version = "0.0.0"
edition = "2018"

[lib]
name = "serialize"
Expand Down
2 changes: 1 addition & 1 deletion src/libserialize/collection_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use std::hash::{Hash, BuildHasher};

use {Decodable, Encodable, Decoder, Encoder};
use crate::{Decodable, Encodable, Decoder, Encoder};
use std::collections::{LinkedList, VecDeque, BTreeMap, BTreeSet, HashMap, HashSet};
use std::rc::Rc;
use std::sync::Arc;
Expand Down
6 changes: 3 additions & 3 deletions src/libserialize/hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub enum FromHexError {
}

impl fmt::Display for FromHexError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
InvalidHexCharacter(ch, idx) =>
write!(f, "Invalid character '{}' at position {}", ch, idx),
Expand Down Expand Up @@ -145,8 +145,8 @@ impl FromHex for str {
#[cfg(test)]
mod tests {
extern crate test;
use self::test::Bencher;
use hex::{FromHex, ToHex};
use test::Bencher;
use crate::hex::{FromHex, ToHex};

#[test]
pub fn test_to_hex() {
Expand Down
Loading

0 comments on commit 308c07b

Please sign in to comment.