Skip to content

Commit

Permalink
update to use parse-zoneinfo crate
Browse files Browse the repository at this point in the history
  • Loading branch information
djzin committed Feb 11, 2017
1 parent 8e74c9a commit bc84a95
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chrono-tz"
version = "0.2.4"
version = "0.2.5"
authors = ["Djzin"]
build = "build.rs"
description = "TimeZone implementations for rust-chrono from the IANA database"
Expand All @@ -14,4 +14,4 @@ license = "MIT/Apache-2.0"
chrono = "0.2"

[build-dependencies]
zoneinfo_parse = "0.1.4"
parse-zoneinfo = "0.1"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Chrono-TZ 0.2.4
# Chrono-TZ 0.2.5

`Chrono-TZ` is a library that provides implementors of the
[`TimeZone`][timezone] trait for [`rust-chrono`][chrono]. The
Expand Down
15 changes: 8 additions & 7 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
extern crate zoneinfo_parse;
extern crate parse_zoneinfo;

use zoneinfo_parse::line::Line;
use zoneinfo_parse::table::{TableBuilder, Table};
use zoneinfo_parse::transitions::TableTransitions;
use zoneinfo_parse::structure::{Structure, Child};
use zoneinfo_parse::transitions::FixedTimespan;
use parse_zoneinfo::line::{LineParser, Line};
use parse_zoneinfo::table::{TableBuilder, Table};
use parse_zoneinfo::transitions::TableTransitions;
use parse_zoneinfo::structure::{Structure, Child};
use parse_zoneinfo::transitions::FixedTimespan;

use std::env;
use std::path::Path;
Expand Down Expand Up @@ -199,6 +199,7 @@ fn write_directory_file(directory_file: &mut File, table: &Table) {
}

fn main() {
let parser = LineParser::new();
let mut table = TableBuilder::new();

let tzfiles = [
Expand All @@ -224,7 +225,7 @@ fn main() {
.map(strip_comments);

for line in lines {
match Line::from_str(&line).unwrap() {
match parser.parse_str(&line).unwrap() {
Line::Zone(zone) => table.add_zone_line(zone).unwrap(),
Line::Continuation(cont) => table.add_continuation_line(cont).unwrap(),
Line::Rule(rule) => table.add_rule_line(rule).unwrap(),
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! # Chrono-TZ 0.2.4
//! # Chrono-TZ 0.2.5
//!
//! `Chrono-TZ` is a library that provides implementors of the
//! [`TimeZone`][timezone] trait for [`rust-chrono`][chrono]. The
Expand Down

0 comments on commit bc84a95

Please sign in to comment.