Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 97c3783

Browse files
committed
Update to rust master
1 parent 11e938d commit 97c3783

File tree

7 files changed

+191
-161
lines changed

7 files changed

+191
-161
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "rustc-serialize"
4-
version = "0.1.3"
4+
version = "0.1.4"
55
authors = ["The Rust Project Developers"]
66
license = "MIT/Apache-2.0"
77
readme = "README.md"

src/base64.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,25 @@ use std::fmt;
1919
use std::error;
2020

2121
/// Available encoding character sets
22+
#[deriving(Copy)]
2223
pub enum CharacterSet {
2324
/// The standard character set (uses `+` and `/`)
2425
Standard,
2526
/// The URL safe character set (uses `-` and `_`)
2627
UrlSafe
2728
}
2829

29-
impl Copy for CharacterSet {}
30-
3130
/// Available newline types
31+
#[deriving(Copy)]
3232
pub enum Newline {
3333
/// A linefeed (i.e. Unix-style newline)
3434
LF,
3535
/// A carriage return and a linefeed (i.e. Windows-style newline)
3636
CRLF
3737
}
3838

39-
impl Copy for Newline {}
40-
4139
/// Contains configuration parameters for `to_base64`.
40+
#[deriving(Copy)]
4241
pub struct Config {
4342
/// Character set to use
4443
pub char_set: CharacterSet,
@@ -50,8 +49,6 @@ pub struct Config {
5049
pub line_length: Option<uint>
5150
}
5251

53-
impl Copy for Config {}
54-
5552
/// Configuration for RFC 4648 standard base64 encoding
5653
pub static STANDARD: Config =
5754
Config {char_set: Standard, newline: Newline::CRLF, pad: true, line_length: None};
@@ -180,15 +177,14 @@ pub trait FromBase64 for Sized? {
180177
}
181178

182179
/// Errors that can occur when decoding a base64 encoded string
180+
#[deriving(Copy)]
183181
pub enum FromBase64Error {
184182
/// The input contained a character not part of the base64 format
185183
InvalidBase64Byte(u8, uint),
186184
/// The input had an invalid length
187185
InvalidBase64Length,
188186
}
189187

190-
impl Copy for FromBase64Error {}
191-
192188
impl fmt::Show for FromBase64Error {
193189
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
194190
match *self {

src/collection_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::default::Default;
1515
use std::hash::{Hash, Hasher};
1616

1717
use {Decodable, Encodable, Decoder, Encoder};
18-
use std::collections::{BTreeMap, BTreeSet, DList, RingBuf, HashMap, HashSet, VecMap};
18+
use std::collections::{DList, RingBuf, BTreeMap, BTreeSet, HashMap, HashSet, VecMap};
1919
use std::collections::enum_set::{EnumSet, CLike};
2020

2121
impl<

src/hex.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,14 @@ pub trait FromHex for Sized? {
6161
}
6262

6363
/// Errors that can occur when decoding a hex encoded string
64+
#[deriving(Copy)]
6465
pub enum FromHexError {
6566
/// The input contained a character not part of the hex format
6667
InvalidHexCharacter(char, uint),
6768
/// The input had an invalid length
6869
InvalidHexLength,
6970
}
7071

71-
impl Copy for FromHexError {}
72-
7372
impl fmt::Show for FromHexError {
7473
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7574
match *self {

0 commit comments

Comments
 (0)