language changes: #[]; -> #![], priv fields by default; added .travis.yml.
This commit is contained in:
parent
0f6ccf0728
commit
5516dc630d
|
@ -0,0 +1,12 @@
|
|||
before_install:
|
||||
- yes | sudo add-apt-repository ppa:hansjorg/rust
|
||||
- sudo apt-get update
|
||||
install:
|
||||
- sudo apt-get install rust-nightly
|
||||
script:
|
||||
- ./configure
|
||||
- make check RUSTFLAGS=
|
||||
- make doc
|
||||
branches:
|
||||
only:
|
||||
- master
|
|
@ -206,7 +206,7 @@ pub trait Datelike {
|
|||
/// Also supports the conversion from ISO 8601 ordinal and week date.
|
||||
#[deriving(Eq, TotalEq, Ord, TotalOrd, Hash)]
|
||||
pub struct DateZ {
|
||||
priv ymdf: DateImpl, // (year << 13) | of
|
||||
ymdf: DateImpl, // (year << 13) | of
|
||||
}
|
||||
|
||||
impl DateZ {
|
||||
|
|
|
@ -46,6 +46,16 @@ impl DateTimeZ {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn date(&self) -> DateZ {
|
||||
self.date
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn time(&self) -> TimeZ {
|
||||
self.time
|
||||
}
|
||||
|
||||
/// Returns the number of non-leap seconds since January 1, 1970 0:00:00.
|
||||
/// Note that this does *not* account for the timezone!
|
||||
#[inline]
|
||||
|
|
|
@ -10,9 +10,9 @@ static SECS_PER_DAY: int = 86400;
|
|||
|
||||
#[deriving(Eq, TotalEq, Ord, TotalOrd)]
|
||||
pub struct Duration {
|
||||
priv days: int,
|
||||
priv secs: u32,
|
||||
priv nanos: u32,
|
||||
days: int,
|
||||
secs: u32,
|
||||
nanos: u32,
|
||||
}
|
||||
|
||||
impl Duration {
|
||||
|
|
|
@ -61,10 +61,10 @@ pub trait Timelike {
|
|||
/// Allows for the nanosecond precision and optional leap second representation.
|
||||
#[deriving(Eq, TotalEq, Ord, TotalOrd, Hash)]
|
||||
pub struct TimeZ {
|
||||
priv hour: u8,
|
||||
priv min: u8,
|
||||
priv sec: u8,
|
||||
priv frac: u32,
|
||||
hour: u8,
|
||||
min: u8,
|
||||
sec: u8,
|
||||
frac: u32,
|
||||
}
|
||||
|
||||
impl TimeZ {
|
||||
|
|
Loading…
Reference in New Issue