commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
53684714b70f6e6c5efb0db737be74ea77d226ac
David Tolnay
2018-09-15T19:25:55
Fix docs.rs link
diff --git a/Cargo.toml b/Cargo.toml index 0d88bf1..a0f8559 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "yaml-rust" version = "0.4.0" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" -documentation = "https://docs.rs/crate/yaml-rust/" +documen...
1
1
1
a8217ad81114a17976664405216c86cc84519385
David Tolnay
2018-09-15T19:25:15
Render readme on crates.io
diff --git a/Cargo.toml b/Cargo.toml index 7907a15..0d88bf1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ documentation = "https://docs.rs/crate/yaml-rust/" license = "MIT/Apache-2.0" description = "The missing YAML 1.2 parser for rust" repository = "https://github.com/chyh1990/yaml-rust" +readme = "READM...
1
1
0
77d6eb2e6987c024e1d4829731ca99d78ab229df
David Tolnay
2018-09-15T19:24:47
Remove commented key in Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index 545c20d..7907a15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,6 @@ documentation = "https://docs.rs/crate/yaml-rust/" license = "MIT/Apache-2.0" description = "The missing YAML 1.2 parser for rust" repository = "https://github.com/chyh1990/yaml-rust" -# publish = fal...
1
0
1
98f01696424cc01e2ddb51e2516b414821a5973f
David Tolnay
2018-09-15T19:20:11
Escape string containing colon I don't know whether this is always necessary but it is required for correctly serializing `["x: %"]`. If we serialize this without quotes to `[x: %]` then the result is not valid YAML.
diff --git a/src/emitter.rs b/src/emitter.rs index ad7882f..10f43ab 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -301,11 +301,12 @@ fn need_quotes(string: &str) -> bool { string == "" || need_quotes_spaces(string) || string.starts_with(|character: char| match character { - ':' |...
2
26
2
9b7bbea66a72f6daab3c81ee76e846c1744f5879
David Tolnay
2018-09-15T17:06:46
Ignore should_implement_trait lint The Parser::next method is already a public API.
diff --git a/src/lib.rs b/src/lib.rs index 28cee86..e3c9f64 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,10 @@ #![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))] #![cfg_attr(feature = "cargo-clippy", warn(cyclomatic_complexity))] -#![cfg_attr(feature = "cargo-clippy", allow(match_same...
1
4
1
f1311191e75fa8faf8ad44210011db0d0c4f7f85
Konrad Borowski
2018-09-15T16:49:17
Add testing whether load(dump(x)) is an identity in quickcheck
diff --git a/tests/quickcheck.rs b/tests/quickcheck.rs index 43fd254..c2c89bc 100644 --- a/tests/quickcheck.rs +++ b/tests/quickcheck.rs @@ -9,13 +9,14 @@ use yaml_rust::{Yaml, YamlEmitter, YamlLoader}; quickcheck! { fn test_check_weird_keys(xs: Vec<String>) -> TestResult { let mut out_str = String::new(...
1
5
4
9d085580ead8828a882213196f7511b484683790
David Tolnay
2018-09-15T17:02:56
Don't yet use tool attrs because they are not stable
diff --git a/src/lib.rs b/src/lib.rs index 36932d9..28cee86 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -36,6 +36,7 @@ //! //! ``` +#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))] #![cfg_attr(feature = "cargo-clippy", warn(cyclomatic_complexity))] #![cfg_attr(feature = "cargo-clippy", all...
1
1
0
d61b49cb90391fc4f7f72a1abe597476c8651a07
Konrad Borowski
2018-09-15T10:33:26
Prevent too deep recursion
diff --git a/src/scanner.rs b/src/scanner.rs index 8919c4a..56496d3 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -149,7 +149,7 @@ pub struct Scanner<T> { simple_keys: Vec<SimpleKey>, indent: isize, indents: Vec<isize>, - flow_level: usize, + flow_level: u8, tokens_parsed: usize, to...
2
18
4
19c4ae01fe81133cde1c2be125212b7b9c75abe8
Igor Gnatenko
2018-09-02T16:13:50
Update quickcheck to 0.7
diff --git a/Cargo.toml b/Cargo.toml index f00d0a9..545c20d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,4 +13,4 @@ repository = "https://github.com/chyh1990/yaml-rust" linked-hash-map = ">=0.0.9, <0.6" [dev-dependencies] -quickcheck = "0.6" +quickcheck = "0.7"
1
1
1
b718def7061451a13e973b476f76776e87768bc3
Hendrik Sollich
2018-06-22T18:56:54
Add tests to show expected indentation interpretation
diff --git a/src/yaml.rs b/src/yaml.rs index b7b2b7c..a7ed23c 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -638,4 +638,61 @@ c: ~ let first = out.into_iter().next().unwrap(); assert_eq!(first[0]["important"].as_bool().unwrap(), true); } + + #[test] + fn test_indentation_equality() { + + ...
1
57
0
f9bfe0959374bf4eb9bcf80a4f2aae9f41e9095c
Hannes De Valkeneer
2018-04-20T06:06:55
Do not quote hyphenated strings unnecessarily. fixes #54
diff --git a/src/emitter.rs b/src/emitter.rs index c77263c..68fe8a4 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -281,8 +281,10 @@ impl<'a> YamlEmitter<'a> { } /// Check if the string requires quoting. +/// Strings starting with any of the following characters must be quoted. +/// :, &, *, ?, |, -, <, >, =, ...
1
11
3
ed7293d64a11ea9f107a7b76ce60e2bc0d2c1a74
Chen Yuheng
2018-01-06T07:27:42
Update document link Fix #94
diff --git a/Cargo.toml b/Cargo.toml index bf82d9d..f00d0a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "yaml-rust" version = "0.4.0" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" -documentation = "http://chyh1990.github.io/yaml-rust/doc/ya...
1
1
1
920aafde36b161d5011a622f982aa954ff3210c6
Yuheng Chen
2018-01-02T07:55:39
fix boolean quotes Fix #92
diff --git a/src/emitter.rs b/src/emitter.rs index 332ff9e..c77263c 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -307,7 +307,10 @@ fn need_quotes(string: &str) -> bool { } }) || [// http://yaml.org/type/bool.html - "y","Y","yes","Yes","YES","n","N","no","No","NO", + // Note: 'y',...
1
11
7
321ee1360b1a8e1d6cb882cb8f5a35c589a36513
Yuheng Chen
2018-01-02T06:57:27
Fix warning
diff --git a/src/yaml.rs b/src/yaml.rs index 5d7ef36..b7b2b7c 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -176,7 +176,7 @@ impl YamlLoader { match *parent { (Yaml::Array(ref mut v), _) => v.push(node.0), (Yaml::Hash(ref mut h), _) => { - let mut cur_ke...
1
1
1
70cc30afa5eef3b79aa84aac42fcb0597932ecca
Igor Gnatenko
2018-01-01T11:33:30
bump quickcheck to 0.6
diff --git a/Cargo.toml b/Cargo.toml index 1fa1293..bf82d9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,4 +13,4 @@ repository = "https://github.com/chyh1990/yaml-rust" linked-hash-map = ">=0.0.9, <0.6" [dev-dependencies] -quickcheck = "0.4" +quickcheck = "0.6"
1
1
1
4eb0d7524c3e57ddbd141c6d07d4559336691585
Yuheng Chen
2017-11-22T07:53:12
Bump to 0.4.0 This version contains breaking API changes in low level event-based API: - The EventReceiver gets ownership of events
diff --git a/Cargo.toml b/Cargo.toml index b2e495f..1fa1293 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "yaml-rust" -version = "0.3.9" +version = "0.4.0" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://ch...
1
2
2
d714aa9490fc0165c0f946a0a4bcc58236026b7c
Yuheng Chen
2017-11-22T03:02:17
Bump to 0.3.9
diff --git a/Cargo.toml b/Cargo.toml index 99d9798..b2e495f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.3.8" +version = "0.3.9" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
73e1270dd8117a827345a3455eaa881799b6f5d8
cetra3
2017-11-15T03:41:39
Include Scanner
diff --git a/src/scanner.rs b/src/scanner.rs index 516f6e5..8919c4a 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -61,8 +61,8 @@ impl ScanError { } } - pub fn marker(&self) -> Marker { - self.mark + pub fn marker(&self) -> &Marker { + &self.mark } }
1
2
2
db2b74457645e872d7f8d5030643cf6d9f697f16
cetra3
2017-11-15T01:36:16
Allow the Marker from ScanError
diff --git a/src/scanner.rs b/src/scanner.rs index 4663b9f..516f6e5 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -60,6 +60,10 @@ impl ScanError { info: info.to_owned() } } + + pub fn marker(&self) -> Marker { + self.mark + } } impl Error for ScanError {
1
4
0
8cd2e7fb22439daaa0e774b756e031694d60c5b6
Marc Addeo
2017-11-12T17:01:39
Add a cause() method to EmitError For compatibility with error_chain
diff --git a/src/emitter.rs b/src/emitter.rs index ef3cdc7..332ff9e 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -17,6 +17,10 @@ impl Error for EmitError { EmitError::BadHashmapKey => "bad hashmap key", } } + + fn cause(&self) -> Option<&Error> { + None + } } impl Disp...
1
4
0
6d0fd840f2dcf6d9159f6abeabb64a36b062c2d6
Martin Hoffmann
2017-09-02T11:49:53
Allow access to Marker’s content.
diff --git a/src/scanner.rs b/src/scanner.rs index 619e2d9..4663b9f 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -33,6 +33,18 @@ impl Marker { col: col } } + + pub fn index(&self) -> usize { + self.index + } + + pub fn line(&self) -> usize { + self.line + } + ...
1
12
0
bc8bab0696339db2f3403df01a453c42aea536af
Yuheng Chen
2017-08-21T05:58:49
Bump to 0.3.8
diff --git a/Cargo.toml b/Cargo.toml index 9515208..99d9798 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.3.7" +version = "0.3.8" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
b2ebf74c2f6dfcc081c3bead1a70ca59ae2e576c
Pedro Côrte-Real
2017-08-18T20:42:02
Upgrade to latest linked-hash-map
diff --git a/Cargo.toml b/Cargo.toml index 91dac70..9515208 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/chyh1990/yaml-rust" publish = false # this branch contains breaking changes [dependencies] -linked-hash-map = ">=0.0.9, <0.5" +linked-hash-map = ">=0.0.9, <0.6" ...
1
1
1
7221fddaabd7a7c0009e2928d244339c3924afa1
Christian Hofer
2017-07-16T16:00:50
Replace ? by try!
diff --git a/src/parser.rs b/src/parser.rs index b59987b..f8b04b5 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -112,7 +112,7 @@ impl<T: Iterator<Item=char>> Parser<T> { match self.current { Some(ref x) => Ok(x), None => { - self.current = Some(self.next()?); + ...
1
1
1
b357f0d7adab5192bed8e878d7fa4e5775fa6190
Christian Hofer
2017-06-22T06:44:46
Extract pull parser.
diff --git a/src/parser.rs b/src/parser.rs index ffaab6b..b59987b 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,8 +1,5 @@ use scanner::*; use std::collections::HashMap; -use std::mem::swap; - -// use yaml::*; #[derive(Clone, Copy, PartialEq, Debug, Eq)] enum State { @@ -72,6 +69,7 @@ pub struct Parser<T> {...
1
97
53
129da82c04cdb0c08fb73f05b5e44812cf6b5999
Charlie Ozinga
2017-07-10T16:08:20
Version bump
diff --git a/Cargo.toml b/Cargo.toml index a4e2fda..91dac70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.3.6" +version = "0.3.7" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
02456f2ac336577837bb04bbe1edc89e26ecff27
Christian Hofer
2017-06-22T07:54:13
Fix version incompatibilities Also: Fix clippy errors
diff --git a/src/parser.rs b/src/parser.rs index 5b95f24..ffaab6b 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -112,7 +112,7 @@ impl<T: Iterator<Item=char>> Parser<T> { fn peek(&mut self) -> Result<&Token, ScanError> { match self.token { None => { - self.token = Some(self...
1
34
34
e9556399ddcd668ad589cf4ab5f71ae4ea511491
Christian Hofer
2017-06-20T13:47:19
Parser: Do not clone on peeking This eliminates calls to clone() and to_owned() in the parser - Peeking now returns reference only - To obtain value, fetch_token needs to be called - The parser was adapted accordingly - Also: Pass anchor name by value to register_anchor
diff --git a/src/parser.rs b/src/parser.rs index 8b511e9..5b95f24 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,5 +1,7 @@ use scanner::*; use std::collections::HashMap; +use std::mem::swap; + // use yaml::*; #[derive(Clone, Copy, PartialEq, Debug, Eq)] @@ -107,22 +109,35 @@ impl<T: Iterator<Item=char>> Par...
1
277
255
7de2c389b948cbfdb32ba0f023ea856732857dc5
Christian Hofer
2017-06-19T13:41:26
Always pass events by value - The EventReceiver gets ownership of events - Breaks compatilibility with previous interface
diff --git a/src/parser.rs b/src/parser.rs index e2bbbd3..8b511e9 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -76,31 +76,20 @@ pub struct Parser<T> { pub trait EventReceiver { - fn on_event(&mut self, ev: &Event); + fn on_event(&mut self, ev: Event); } pub trait MarkedEventReceiver { - fn on_e...
3
23
34
e14bdab301a0afab548547648c1870d80100b64a
Christian Hofer
2017-06-14T08:29:27
Allow clients ownership of events Also: Optimize built-in Yaml deserializer to avoid one scalar value cloning step.
diff --git a/src/parser.rs b/src/parser.rs index 7d147e7..e2bbbd3 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -90,6 +90,15 @@ impl<R: EventReceiver> MarkedEventReceiver for R { } } +pub trait MarkedOwnedEventReceiver { + fn on_owned_event(&mut self, ev: Event, _mark: Marker); +} + +impl<R: MarkedEventR...
2
62
42
6801a7726fa39b727981dd254a2e40dd5a08f78e
Hendrik Sollich
2017-06-10T22:19:20
correctly emitting deeply nested arrays
diff --git a/src/emitter.rs b/src/emitter.rs index c7bc154..7a5662e 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -142,7 +142,7 @@ impl<'a> YamlEmitter<'a> { fn emit_node(&mut self, node: &Yaml) -> EmitResult { match *node { - Yaml::Array(ref v) => self.emit_array(v), + Yaml:...
1
77
9
11a0ba7e6a95dc961de010f480cf769c560bf9fa
Hendrik Sollich
2017-06-10T21:39:07
correctly emitting nested arrays fixed #70 too
diff --git a/src/emitter.rs b/src/emitter.rs index 91c94b2..c7bc154 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -134,39 +134,8 @@ impl<'a> YamlEmitter<'a> { fn emit_node_compact(&mut self, node: &Yaml) -> EmitResult { match *node { - Yaml::Array(ref v) => { - try!(w...
2
69
49
629daa241d1b028dd7332f8fed1827a53c8834cc
Charlie Ozinga
2017-05-23T18:17:50
Move the compact flag into the emitter itself
diff --git a/src/emitter.rs b/src/emitter.rs index 065d46b..2ed20c2 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -3,14 +3,6 @@ use std::convert::From; use std::error::Error; use yaml::{Hash, Yaml}; -/// If the emitter should output in 'compact inline notation' form, as -/// described for block -/// [sequence...
1
33
12
df35e8cde65b0befb6bf14c33806067533e5be1b
Hendrik Sollich
2017-05-22T17:30:01
quoting possible booleans fixes #53
diff --git a/Cargo.toml b/Cargo.toml index 0c79598..a4e2fda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.3.5" +version = "0.3.6" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
2
48
12
24d1b0b0f822c38241c2761304ae5ee4f849bf8d
Yuheng Chen
2017-05-13T13:55:32
Allow use integer as key to access HashMap Fix #61
diff --git a/src/yaml.rs b/src/yaml.rs index 657de55..d745dc6 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -330,9 +330,13 @@ impl Index<usize> for Yaml { type Output = Yaml; fn index(&self, idx: usize) -> &Yaml { - match self.as_vec() { - Some(v) => v.get(idx).unwrap_or(&BAD_VALUE), - ...
1
20
3
9dd7b8927462baf0221f7dcb9c456585a3f597d1
Yuheng Chen
2017-05-13T13:22:19
Parse special f64 in tag
diff --git a/src/yaml.rs b/src/yaml.rs index 99000df..657de55 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -55,6 +55,17 @@ pub enum Yaml { pub type Array = Vec<Yaml>; pub type Hash = LinkedHashMap<Yaml, Yaml>; +// parse f64 as Core schema +// See: https://github.com/chyh1990/yaml-rust/issues/51 +fn parse_f64(v: &s...
1
16
12
cbeffc51dcc769eceb1b2723043b2fbd6a07c0a5
Yuheng Chen
2017-05-13T13:17:35
Add special f64 parsing Fix #51
diff --git a/src/yaml.rs b/src/yaml.rs index d67d6a2..99000df 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -2,6 +2,7 @@ use std::collections::BTreeMap; use std::ops::Index; use std::string; use std::i64; +use std::f64; use std::mem; use std::vec; use parser::*; @@ -226,6 +227,15 @@ pub fn $name(self) -> Option<$...
1
18
7
3e310eee234df7d05744b615f3485727f09c4761
Charlie Ozinga
2017-05-12T05:36:51
Remove extraneous debug output from test
diff --git a/tests/spec_test.rs b/tests/spec_test.rs index 1896d17..3e5d043 100644 --- a/tests/spec_test.rs +++ b/tests/spec_test.rs @@ -136,8 +136,6 @@ fn test_mapvec_legal() { // - 6 // ``` - println!("{}", out_str); - YamlLoader::load_from_str(&out_str).unwrap(); }
1
0
2
42798fc53fb24cd712a9c08c3576d2d94810c820
Charlie Ozinga
2017-05-12T05:29:41
Fix nested arrays, emit compact in-line
diff --git a/src/emitter.rs b/src/emitter.rs index ba0bf7e..065d46b 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -3,6 +3,15 @@ use std::convert::From; use std::error::Error; use yaml::{Hash, Yaml}; +/// If the emitter should output in 'compact inline notation' form, as +/// described for block +/// [sequence...
2
70
44
5634ec2b7ab52cd56fe879f02a198a730326402b
Charlie Ozinga
2017-05-11T18:36:38
Rebased and resolved conflicts with the following: https://github.com/chyh1990/yaml-rust/pull/66 https://github.com/chyh1990/yaml-rust/pull/62 (closed in favor of 66)
diff --git a/src/emitter.rs b/src/emitter.rs index 45f2024..ba0bf7e 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -132,48 +132,6 @@ impl<'a> YamlEmitter<'a> { Ok(()) } - fn emit_node_compact(&mut self, node: &Yaml) -> EmitResult { - match *node { - Yaml::Array(ref v) => { - ...
2
85
49
4e336f4ff4cc6972783368a8557e617f69d31d71
David Tolnay
2017-05-08T18:43:42
Implement Error for EmitError Fixes #50.
diff --git a/src/emitter.rs b/src/emitter.rs index 7d2ec0a..45f2024 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -1,5 +1,6 @@ -use std::fmt; +use std::fmt::{self, Display}; use std::convert::From; +use std::error::Error; use yaml::{Hash, Yaml}; #[derive(Copy, Clone, Debug)] @@ -8,6 +9,24 @@ pub enum EmitErr...
1
20
1
7b6f6507190d0ad2f9b9f983ab4ae49932e7395d
David Tolnay
2017-05-08T18:35:53
Fix clippy complaints
diff --git a/examples/dump_yaml.rs b/examples/dump_yaml.rs index a77d676..5f2e306 100644 --- a/examples/dump_yaml.rs +++ b/examples/dump_yaml.rs @@ -12,13 +12,13 @@ fn print_indent(indent: usize) { } fn dump_node(doc: &yaml::Yaml, indent: usize) { - match doc { - &yaml::Yaml::Array(ref v) => { + match ...
4
10
8
651f5cdee83202f28cb08a65bc30afc3b2634746
David Tolnay
2017-05-08T18:17:30
Revert "fix test: add missing end space" This reverts commit 5908568f1ada074fb64759a738099d3932e57fd5.
diff --git a/src/emitter.rs b/src/emitter.rs index baf9412..3ea2f2d 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -395,7 +395,7 @@ products: amount: 4 "*cookies": amount: 4 - ".milk": + ".milk": amount: 1 "2.4": real key "[1,2,3,4]": array key
1
1
1
efbe0d583e9673d95a5b4fa575bfdebcf288cd77
David Tolnay
2017-05-08T18:03:03
Allow the newest linked-hash-map Closes #52 and closes #55 and closes #63.
diff --git a/Cargo.toml b/Cargo.toml index 651a11f..00688e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ publish = false # this branch contains breaking changes [dependencies] clippy = { version = "^0.*", optional = true } -linked-hash-map = ">=0.0.9, <0.4" +linked-hash-map = ">=0.0.9, <0.5" [dev-d...
1
1
1
fd3df669f68bceb73fba4a304ec0929e501075f0
David Tolnay
2017-05-08T18:02:03
Remember to publish a breaking release
diff --git a/Cargo.toml b/Cargo.toml index 1e63db6..651a11f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ documentation = "http://chyh1990.github.io/yaml-rust/doc/yaml_rust/" license = "MIT/Apache-2.0" description = "The missing YAML 1.2 parser for rust" repository = "https://github.com/chyh1990/yaml-rust...
1
1
0
3a861d3d5debd287464b93fc11125f1bce02204d
David Tolnay
2017-05-08T17:44:17
Restore import that was broken in #57
diff --git a/src/emitter.rs b/src/emitter.rs index 308bd93..cd83994 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -278,6 +278,7 @@ fn need_quotes(string: &str) -> bool { #[cfg(test)] mod tests { use super::*; + use YamlLoader; #[test] fn test_emit_simple() {
1
1
0
08733a72e6c2a617b2eefeb7a8afa274b1c65cf7
Tom Parker
2017-03-12T16:02:47
Add quoting for " and '
diff --git a/src/emitter.rs b/src/emitter.rs index 308bd93..0d2defa 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -263,7 +263,7 @@ fn need_quotes(string: &str) -> bool { || need_quotes_spaces(string) || string.contains(|character: char| { match character { - ':' | '{' | '}' | '[' | '...
1
1
1
bf27b1587700f0f62d688c19eabb003d850f76d6
Tom Parker
2017-03-12T16:02:18
Add quickcheck to find broken exports
diff --git a/Cargo.toml b/Cargo.toml index c4a4780..1e63db6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,3 +11,6 @@ repository = "https://github.com/chyh1990/yaml-rust" [dependencies] clippy = { version = "^0.*", optional = true } linked-hash-map = ">=0.0.9, <0.4" + +[dev-dependencies] +quickcheck = "0.4" diff --...
2
24
0
acbdc9e7e420ebc0a82ceff1ecd9ffc8cc2b45fd
David Tolnay
2017-04-29T17:00:26
Bump to 0.3.5
diff --git a/Cargo.toml b/Cargo.toml index b0459e2..ad3ed81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.3.4" +version = "0.3.5" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
5908568f1ada074fb64759a738099d3932e57fd5
Iazel
2017-05-06T17:16:00
fix test: add missing end space
diff --git a/src/emitter.rs b/src/emitter.rs index 51366e8..493236a 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -375,7 +375,7 @@ products: amount: 4 "*cookies": amount: 4 - ".milk": + ".milk": amount: 1 "2.4": real key "[1,2,3,4]": array key
1
1
1
5f331ce27226195b7c53b0934c111c2b55d9a4ab
Iazel
2017-05-06T17:06:10
Quotes string starting with a dot To understand why we want to do this, please refer to this issue on ktmpl repository (a way to have templates for kubernetes): https://github.com/InQuicker/ktmpl/issues/15 The problem applies only to string used as keys, but given that the emitters right now doesn't differentiate ...
diff --git a/src/emitter.rs b/src/emitter.rs index 9cd6a2d..51366e8 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -271,6 +271,7 @@ fn need_quotes(string: &str) -> bool { || string == "false" || string == "null" || string == "~" + || string.starts_with('.') || string.parse::<i64>().is_ok() ...
1
3
0
a5206e5d9984d2c608e856cc68a19fa791fb6e75
Isobel Redelmeier
2017-05-02T07:54:46
Do not emit trailing whitespace
diff --git a/src/emitter.rs b/src/emitter.rs index 9cd6a2d..f754070 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -1,6 +1,6 @@ use std::fmt; use std::convert::From; -use yaml::Yaml; +use yaml::{Array, Hash, Yaml}; #[derive(Copy, Clone, Debug)] pub enum EmitError { @@ -151,61 +151,14 @@ impl<'a> YamlEmitter<...
1
97
54
1f324f72ce7c3a28e334ecf716e22e0b8043a7bc
Tom Parker
2017-03-12T16:00:10
Remove warnings about unused items
diff --git a/src/emitter.rs b/src/emitter.rs index e56fc14..9cd6a2d 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -1,6 +1,6 @@ use std::fmt; use std::convert::From; -use yaml::*; +use yaml::Yaml; #[derive(Copy, Clone, Debug)] pub enum EmitError { diff --git a/src/yaml.rs b/src/yaml.rs index d9f63d4..cd8ebb1...
2
1
2
27e6badea88346fd3b318bf1fb521e58b310d692
David Tolnay
2017-01-28T04:50:52
Always preserve order
diff --git a/Cargo.toml b/Cargo.toml index b0459e2..ea768ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,9 +8,6 @@ license = "MIT/Apache-2.0" description = "The missing YAML 1.2 parser for rust" repository = "https://github.com/chyh1990/yaml-rust" -[features] -preserve_order = ["linked-hash-map"] - [dependencies...
4
21
21
bbe06964006ef8c12cd1f08b00bd6a95a0e752d1
Yuheng Chen
2016-11-24T10:10:49
Use push_str() instead of extend()
diff --git a/src/scanner.rs b/src/scanner.rs index e7a5290..d25ecb8 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -1082,11 +1082,11 @@ impl<T: Iterator<Item=char>> Scanner<T> { } leading_break.clear(); } else { - string.extend(leading_break.cha...
1
12
12
8d588927df22ee36df6b2be4be0fe93d9217c53f
Yuheng Chen
2016-11-14T03:17:14
Emitter: quote strings starts/ends with spaces
diff --git a/src/emitter.rs b/src/emitter.rs index 6354c86..e56fc14 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -254,7 +254,14 @@ impl<'a> YamlEmitter<'a> { /// * When the string looks like a number, such as integers (e.g. 2, 14, etc.), floats (e.g. 2.6, 14.9) and exponential numbers (e.g. 12e7, etc.) (otherwi...
1
11
2
24441dfef2ce4a536576d07ec572507fc2d7d6a2
Yuheng Chen
2016-11-14T03:22:32
Comment out unreachable states
diff --git a/src/parser.rs b/src/parser.rs index 2b7d441..7d147e7 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -10,8 +10,8 @@ enum State { DocumentContent, DocumentEnd, BlockNode, - BlockNodeOrIndentlessSequence, - FlowNode, + // BlockNodeOrIndentlessSequence, + // FlowNode, BlockSe...
1
4
4
d9cf82a6ceb687430abea72c37e88d119cd1ad3e
Martin Hoffmann
2016-11-11T10:53:31
Make YamlLoader implement MarkedEventReceiver.
diff --git a/src/yaml.rs b/src/yaml.rs index 6d0417c..d9f63d4 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -6,7 +6,7 @@ use std::str::FromStr; use std::mem; use std::vec; use parser::*; -use scanner::{TScalarStyle, ScanError, TokenType}; +use scanner::{TScalarStyle, ScanError, TokenType, Marker}; /// A YAML node...
1
3
3
a8d1d23eb18259a4a3d1f13076b775046cc146e8
Martin Hoffmann
2016-11-10T10:53:28
Introduce a new trait for event receivers that want markers.
diff --git a/src/parser.rs b/src/parser.rs index 3a64045..2b7d441 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -74,14 +74,24 @@ pub struct Parser<T> { anchor_id: usize, } + pub trait EventReceiver { fn on_event(&mut self, ev: &Event); +} - fn on_event_with_marker(&mut self, ev: &Event, _mark: Ma...
1
20
10
2d6a83d7fcdd801ed1eb8d6dfe679d30e0f895c9
Yuheng Chen
2016-11-10T07:31:07
always quote empty string
diff --git a/src/emitter.rs b/src/emitter.rs index 390bf53..6354c86 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -259,10 +259,14 @@ fn need_quotes(string: &str) -> bool { ':' | '{' | '}' | '[' | ']' | ',' | '&' | '*' | '#' | '?' | '|' | '-' | '<' | '>' | '=' | '!' | '%' | '@' | '`' | '\\' | '\0' ......
1
9
4
afba69b0bc63008f96d943c2abc08e525befb723
Martin Hoffmann
2016-11-09T12:04:48
Pass markers to EventReceiver.
diff --git a/src/parser.rs b/src/parser.rs index 678f841..3a64045 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -76,9 +76,13 @@ pub struct Parser<T> { pub trait EventReceiver { fn on_event(&mut self, ev: &Event); + + fn on_event_with_marker(&mut self, ev: &Event, _mark: Marker) { + self.on_event(e...
1
45
41
be37bde658ed3df1d5a0336eea031474f0b2557f
Antoni Boucher
2016-11-02T20:56:46
Fixed to always avoid quoting when possible.
diff --git a/src/emitter.rs b/src/emitter.rs index 2bc6cd4..390bf53 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -17,7 +17,6 @@ impl From<fmt::Error> for EmitError { pub struct YamlEmitter<'a> { writer: &'a mut fmt::Write, best_indent: usize, - avoid_quotes: bool, level: isize, } @@ -87,39 ...
1
2
33
963fc95a6b14dd77c826d089e2385042f97fe31a
Antoni Boucher
2016-11-02T02:03:35
Added an option to avoid emitting quotes.
diff --git a/src/emitter.rs b/src/emitter.rs index 0631ec2..2bc6cd4 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -17,6 +17,7 @@ impl From<fmt::Error> for EmitError { pub struct YamlEmitter<'a> { writer: &'a mut fmt::Write, best_indent: usize, + avoid_quotes: bool, level: isize, } @@ -86,11 ...
1
100
1
49d84c7dad7e3ea9ff6acf6b7d368eaaca2aee5f
Yuheng Chen
2016-10-14T04:41:22
Bump to 0.3.4
diff --git a/Cargo.toml b/Cargo.toml index accaceb..b0459e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.3.3" +version = "0.3.4" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
185f0961ea244191dd6552c9490c6c03a259059b
Hendrik Sollich
2016-09-22T12:17:42
added test for emitting equivalence of complex keys
diff --git a/src/emitter.rs b/src/emitter.rs index 2ee7b98..0631ec2 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -263,6 +263,7 @@ a7: 你好 'key 1': \"ddd\\\tbbb\" "; + let docs = YamlLoader::load_from_str(&s).unwrap(); let doc = &docs[0]; let mut writer = String::new(); @@ -275,4 +27...
1
34
0
500c1fd143666916bcf647bdd2a80f3b9b356db0
Yuheng Chen
2016-09-22T08:54:51
Fix clippy warning
diff --git a/src/yaml.rs b/src/yaml.rs index 6ed730d..6d0417c 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -345,7 +345,10 @@ impl IntoIterator for Yaml { type IntoIter = YamlIter; fn into_iter(self) -> Self::IntoIter { - YamlIter {yaml: self.into_vec().unwrap_or(vec![]).into_iter()} + YamlIte...
1
4
1
6ece0ec046582a79acd145dd7cf6f56be031aca6
Hendrik Sollich
2016-09-16T18:06:50
fixed: emitter also emits complex keys
diff --git a/src/emitter.rs b/src/emitter.rs index fe9a6e1..2ee7b98 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -113,6 +113,48 @@ impl<'a> YamlEmitter<'a> { Ok(()) } + fn emit_node_compact(&mut self, node: &Yaml) -> EmitResult { + match *node { + Yaml::Array(ref v) => { + ...
1
44
2
9dbec6bdc2fc3077f38f8eff18e53261b11ea16e
David Tolnay
2016-08-29T18:39:39
Allow range of linked-hash-map versions
diff --git a/Cargo.toml b/Cargo.toml index 96cd00b..accaceb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,4 +13,4 @@ preserve_order = ["linked-hash-map"] [dependencies] clippy = { version = "^0.*", optional = true } -linked-hash-map = { version = "0.0.9", optional = true } +linked-hash-map = { version = ">=0.0.9,...
1
1
1
e8b95862bbbd2a3edf7e1e75542384072582934b
Matthew Piziak
2016-08-08T22:21:57
properly wrap Vec's IntoIter property
diff --git a/src/yaml.rs b/src/yaml.rs index e5af16f..6ed730d 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -4,6 +4,7 @@ use std::string; use std::i64; use std::str::FromStr; use std::mem; +use std::vec; use parser::*; use scanner::{TScalarStyle, ScanError, TokenType}; @@ -344,21 +345,19 @@ impl IntoIterator for...
1
4
5
8ba7514b3b1aa10a314f84b3d01c88fba15f6e29
Matthew Piziak
2016-08-08T21:52:24
remove clone from `into_iter`
diff --git a/src/yaml.rs b/src/yaml.rs index 96b4cc4..e5af16f 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -234,7 +234,7 @@ pub fn $name(self) -> Option<$t> { } } ); -); +); impl Yaml { define_as!(as_bool, bool, Boolean); @@ -245,7 +245,7 @@ impl Yaml { define_as_ref!(as_vec, &Array, Array); ...
1
13
14
5ead7801bb5b2c99f0442b46efe23ee9e63a08ac
Matthew Piziak
2016-08-08T21:31:36
implement IntoIterator for Yaml
diff --git a/src/yaml.rs b/src/yaml.rs index 6cc1f1c..96b4cc4 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -339,6 +339,30 @@ impl Index<usize> for Yaml { } } +impl IntoIterator for Yaml { + type Item = Yaml; + type IntoIter = YamlIter; + + fn into_iter(self) -> Self::IntoIter { + YamlIter {yaml...
1
43
25
68323ac61a5454cc4ce00a80782312daa1093879
Matthew Piziak
2016-08-08T02:25:30
add `into_` counterparts for all `as_` methods fix #28
diff --git a/src/yaml.rs b/src/yaml.rs index 04a2fca..6cc1f1c 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -225,6 +225,17 @@ pub fn $name(&self) -> Option<$t> { ); ); +macro_rules! define_into ( + ($name:ident, $t:ty, $yt:ident) => ( +pub fn $name(self) -> Option<$t> { + match self { + Yaml::$yt(v...
1
77
1
f7d2897bc0621ef38d7f6d844c6402d64dcbee23
Yuheng Chen
2016-07-28T09:36:25
Use empty_scalar_with_anchor properly This closes #27.
diff --git a/src/parser.rs b/src/parser.rs index 78408e4..678f841 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -58,8 +58,8 @@ impl Event { Event::Scalar("~".to_owned(), TScalarStyle::Plain, 0, None) } - fn empty_scalar_with_anchor(anchor: usize, tag: TokenType) -> Event { - Event::Scalar(...
2
11
3
1bb983516dc3d4488a0b49e0c46158b69e3dec92
Hendrik Sollich
2016-06-22T21:57:24
Fix logic error that caused infinite loop
diff --git a/src/scanner.rs b/src/scanner.rs index 058a050..e7a5290 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -1191,12 +1191,12 @@ impl<T: Iterator<Item=char>> Scanner<T> { self.lookahead(4); if self.mark.col == 0 && - ((self.buffer[0] == '-') && + (((...
2
12
4
0d2d6babb492eeeacb32385fb0246e8585dc89a1
Yuheng Chen
2016-06-22T08:05:40
Rename NoEvent to Nothing to make clippy happy
diff --git a/src/parser.rs b/src/parser.rs index eb574c0..78408e4 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -35,7 +35,7 @@ enum State { #[derive(Clone, PartialEq, Debug, Eq)] pub enum Event { /// Reserved for internal use - NoEvent, + Nothing, StreamStart, StreamEnd, DocumentStart,
1
1
1
2b47383479a5b1e9f14846fc03d178c096408acd
Hendrik Sollich
2016-06-21T19:50:27
returning ScanError instead of running unreachable!() fixes #23
diff --git a/src/scanner.rs b/src/scanner.rs index 3d6b3c1..058a050 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -949,7 +949,7 @@ impl<T: Iterator<Item=char>> Scanner<T> { self.roll_indent(mark.col, None, TokenType::BlockSequenceStart, mark); } else { // - * only allowed in blo...
2
8
1
065e9e56a2631eaa266e0122f713fa2cbbbd8146
Yuheng Chen
2016-06-01T04:14:06
Bump to 0.3.3
diff --git a/Cargo.toml b/Cargo.toml index 7bcc411..96cd00b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.3.2" +version = "0.3.3" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
7b187c849ad5233466e7ba05e1698918225f84f5
Yuheng Chen
2016-05-25T05:19:36
Fix assert fail on empty document This closes #20
diff --git a/src/parser.rs b/src/parser.rs index 65924d7..eb574c0 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -124,8 +124,7 @@ impl<T: Iterator<Item=char>> Parser<T> { fn parse<R: EventReceiver>(&mut self, recv: &mut R) -> ParseResult { - if self.scanner.stream_ended() - || self....
2
9
2
071f21f7b0824edf2209871b5f8fc36a23b0bccb
Yuheng Chen
2016-03-22T14:27:13
Bump to 0.3.2 1. Add preserve_order feature 2. Add clippy in nightly build
diff --git a/Cargo.toml b/Cargo.toml index c5e70fd..7bcc411 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.3.1" +version = "0.3.2" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
a437d0bd83afccb25a4f1ab38410fe4a05274d5d
David Tolnay
2016-03-20T05:06:44
Add preserve_order feature to use LinkedHashMap instead of BTreeMap
diff --git a/Cargo.toml b/Cargo.toml index 46d8c7a..c5e70fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,5 +8,9 @@ license = "MIT/Apache-2.0" description = "The missing YAML 1.2 parser for rust" repository = "https://github.com/chyh1990/yaml-rust" +[features] +preserve_order = ["linked-hash-map"] + [dependencies...
3
21
1
f66a9c69a0cebf2c7b24a208e960bff89ea67872
Yuheng Chen
2016-03-10T12:49:02
Fix clippy warnings about `not`
diff --git a/src/scanner.rs b/src/scanner.rs index d0b5e2b..3d6b3c1 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -647,11 +647,11 @@ impl<T: Iterator<Item=char>> Scanner<T> { self.lookahead(1); - if !is_blankz(self.ch()) { + if is_blankz(self.ch()) { + Ok(Token(*mark, TokenTy...
2
29
28
fc0d07064e7e6f419abf54b98db15ee9bfe2ac80
David Tolnay
2016-03-10T09:55:21
Grammar in rustdoc
diff --git a/src/yaml.rs b/src/yaml.rs index 6db2a1b..92e053c 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -7,7 +7,7 @@ use std::mem; use parser::*; use scanner::{TScalarStyle, ScanError, TokenType}; -/// An YAML node is store as this `Yaml` enumeration, it provides an easy way to +/// A YAML node is stored as thi...
1
15
15
ef49587285820a7a018e114804884832e5a9a766
David Tolnay
2016-02-27T23:29:34
Remove common suffix from TokenType enum See https://github.com/Manishearth/rust-clippy/wiki#enum_variant_names
diff --git a/src/parser.rs b/src/parser.rs index 9a11abf..a6cdf73 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -270,7 +270,7 @@ impl<T: Iterator<Item=char>> Parser<T> { let tok = try!(self.peek()); match tok.1 { - TokenType::StreamStartToken(_) => { + TokenType::StreamStar...
3
272
272
5d59eca79ee9289bc9afa6a4e49f268c0258ebbb
GaveUp
2016-02-07T22:21:05
Fix tests on 1.0.0 and 1.1.0.
diff --git a/src/yaml.rs b/src/yaml.rs index 649c271..45f2fb8 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -259,6 +259,9 @@ impl Yaml { return Yaml::Integer(n.unwrap()); } } + if v.starts_with("+") && v[1..].parse::<i64>().is_ok() { + return Yaml::Integer(v[1..].parse:...
1
3
0
5048fcc423777e92c5770a4be361a6e67443b8f5
GaveUp
2016-02-07T21:52:20
Add hex and octal integer support.
diff --git a/src/yaml.rs b/src/yaml.rs index 3e8f820..649c271 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -1,6 +1,7 @@ use std::collections::BTreeMap; use std::ops::Index; use std::string; +use std::i64; use std::str::FromStr; use std::mem; use parser::*; @@ -246,6 +247,18 @@ impl Yaml { } pub fn fr...
1
26
1
840a560e0e20cffd744251c1d9d245029145de39
Yuheng Chen
2016-01-11T04:55:05
Bump to 0.3.1 No code change, just for relicense.
diff --git a/Cargo.toml b/Cargo.toml index 56ad109..d427e4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.3.0" +version = "0.3.1" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
33d5bfc7fac95cfd93eecf59f7a2c38e41593587
Yuheng Chen
2015-12-24T06:55:49
Bump to 0.3.0 Add alias support
diff --git a/Cargo.toml b/Cargo.toml index a120413..1552e6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.2.2" +version = "0.3.0" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
9dc0953e75d476ffbe111c0fe036a124bfc71c13
Yuheng Chen
2015-09-17T10:08:58
Bump to 0.2.2
diff --git a/Cargo.toml b/Cargo.toml index a511b62..a120413 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.2.1" +version = "0.2.2" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
8194bd933d403c93945d9516804627a6f5482529
Yuheng Chen
2015-09-15T07:27:32
Fix CR/LF in literal scalar
diff --git a/src/scanner.rs b/src/scanner.rs index 03f717d..4cfe2bc 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -1099,9 +1099,11 @@ impl<T: Iterator<Item=char>> Scanner<T> { self.skip(); self.lookahead(1); } + // break on EOF + if is_z(self.ch...
1
3
1
0882ad77a8cb160eccb2800467911dc130dd1660
Yuheng Chen
2015-07-02T16:03:29
Bump to v0.2.1
diff --git a/Cargo.toml b/Cargo.toml index 1a52afd..a511b62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaml-rust" -version = "0.2.0" +version = "0.2.1" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh...
1
1
1
5dadb900a012100699973b6e3b566dc1a024dadb
Yuheng Chen
2015-07-02T15:46:04
Display error line and col number for ScanError
diff --git a/src/lib.rs b/src/lib.rs index d18f85e..1cba925 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,6 +50,7 @@ pub use emitter::{YamlEmitter, EmitError}; #[cfg(test)] mod tests { use super::*; + #[test] fn test_api() { let s = @@ -91,6 +92,11 @@ mod tests { assert!(writer.len(...
2
10
1
ee7ab127e1c1c414a991dc2b1f429bdeb565f431
Yuheng Chen
2015-06-29T16:31:22
remove trailing space
diff --git a/src/lib.rs b/src/lib.rs index c301ab9..d18f85e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,14 +29,13 @@ //! let docs = YamlLoader::load_from_str("[1, 2, 3]").unwrap(); //! let doc = &docs[0]; // select the first document //! assert_eq!(doc[0].as_i64().unwrap(), 1); // access elements by index -//! ...
5
24
31
aa0a0a08c0886ba38cc343f466c670c37407d36e
m-r-r
2015-06-18T21:49:28
Implementation of std::scanner::Error for ScanError
diff --git a/src/scanner.rs b/src/scanner.rs index 470a25d..f78ae89 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -1,5 +1,6 @@ use std::collections::VecDeque; -use std::char; +use std::{char, fmt}; +use std::error::Error; #[derive(Clone, Copy, PartialEq, Debug, Eq)] pub enum TEncoding { @@ -49,6 +50,22 @@ im...
1
18
1
4d3330c2d8a9255502c528eed16f5e1fc5789c73
Yuheng Chen
2015-06-04T08:33:55
Add repository to Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index 7f36ff9..1a52afd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,5 +4,6 @@ version = "0.2.0" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh1990.github.io/yaml-rust/doc/yaml_rust/" -license-f...
1
2
1
fb879b3836b912e853fc97118b22746fe357dc79
Yuheng Chen
2015-06-04T08:30:31
Add license and description to Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index fa04339..7f36ff9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,3 +4,5 @@ version = "0.2.0" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] homepage = "http://chyh1990.github.io/yaml-rust/" documentation = "http://chyh1990.github.io/yaml-rust/doc/yaml_rust/" +license-f...
1
2
0
35e665cb68b4182b9513e9e863c5ce43a4cdb053
Yuheng Chen
2015-06-04T08:28:01
Bump to 0.2.0
diff --git a/Cargo.toml b/Cargo.toml index d7dd718..fa04339 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,6 @@ [package] name = "yaml-rust" -version = "0.1.0" +version = "0.2.0" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] +homepage = "http://chyh1990.github.io/yaml-rust/" +documentation = "http://chyh...
1
3
1
d54dc1017fe1866c474493ebe1d94a88e5898c3d
Yuheng Chen
2015-06-04T08:10:43
Better code coverage
diff --git a/src/emitter.rs b/src/emitter.rs index 4601ba2..8810c95 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -217,6 +217,8 @@ a4: - - a1 - a2 - 2 + - [] + - {} a5: 'single_quoted' a6: \"double_quoted\" a7: 你好 diff --git a/src/parser.rs b/src/parser.rs index 51001a8..f097a80 100644 -...
3
21
2
5b8bc1856d767f71394ff0f92715d755dcb724c0
Yuheng Chen
2015-05-31T09:02:22
Export API
diff --git a/src/emitter.rs b/src/emitter.rs index 650d921..4601ba2 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -233,7 +233,6 @@ a7: 你好 let docs_new = YamlLoader::load_from_str(&s).unwrap(); let doc_new = &docs_new[0]; - println!("{}", writer); assert_eq!(doc, doc_new); ...
2
62
3
f0707580153cb62e8dbd59e6f9a9ecd826575e96
Yuheng Chen
2015-05-30T14:39:50
Add tag:yaml.org,2002 parsing
diff --git a/src/parser.rs b/src/parser.rs index b2a35cb..b70f88e 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -39,7 +39,8 @@ pub enum Event { DocumentEnd, // anchor_id Alias(usize), - Scalar(String, TScalarStyle, usize), + // value, style, anchor_id, tag + Scalar(String, TScalarStyle, usiz...
4
137
34
de58aafaf0aeace052104d0332e8d5e5888fc7ee
Yuheng Chen
2015-05-30T10:49:54
Add scan_uri_escapes
diff --git a/src/scanner.rs b/src/scanner.rs index 94b2639..2887356 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -499,8 +499,18 @@ impl<T: Iterator<Item=char>> Scanner<T> { try!(self.scan_tag_directive_value(&start_mark)) }, // XXX This should be a warning instead of an...
2
67
5