David Tolnay
59e30ab74e
Merge pull request #5 from dtolnay/fail
...
Expose .fail as the opposite of .ok
2022-07-23 12:58:59 -07:00
David Tolnay
fb6de5f433
Expose .fail as the opposite of .ok
2022-07-23 12:51:54 -07:00
David Tolnay
c47432e38b
Remove ParialEq<i32> from Success
...
Generated with the assistance of:
sed -i 's/) == 0\b/) == Zero/' src/*.rs
sed -i 's/) != 0\b/) != Zero/' src/*.rs
2022-07-23 12:47:59 -07:00
David Tolnay
a69723b2d8
Clean up error checking in fuzzer and bins
2022-07-23 12:47:09 -07:00
David Tolnay
093886f2d2
Switch emitter helpers to Success
2022-07-23 12:35:50 -07:00
David Tolnay
76b86e46a4
Switch to Success in macro expansions
2022-07-23 12:27:35 -07:00
David Tolnay
9c2427cee4
Convert emitter check functions to return bool
2022-07-23 12:23:58 -07:00
David Tolnay
11ccd20d29
Update signature of READ helpers
2022-07-23 12:23:58 -07:00
David Tolnay
bb28c2ac3f
Merge pull request #4 from dtolnay/success
...
Remove return value from error setter functions
2022-07-23 12:23:48 -07:00
David Tolnay
ad48c6c7a7
Remove return value from error setter functions
2022-07-23 12:17:35 -07:00
David Tolnay
b8b6bbe1b4
Merge pull request #3 from dtolnay/success
...
Add must_use to Success
2022-07-23 12:17:27 -07:00
David Tolnay
252b895103
Add must_use to Success
2022-07-23 12:10:16 -07:00
David Tolnay
f0f958d9fb
Merge pull request #2 from dtolnay/success
...
Replace 1/0 exit codes with Success type
2022-07-23 12:06:33 -07:00
David Tolnay
f90a3aee19
Replace 1/0 exit codes with Success type
2022-07-23 12:00:09 -07:00
David Tolnay
ba4bcb611e
Release 0.1.3
2022-07-23 01:21:48 -07:00
David Tolnay
a59ca716e8
Change yaml_mark_t.index to count bytes not codepoints
2022-07-23 01:11:07 -07:00
David Tolnay
c7752de455
Reduce addr_of_mut usage in scanner macros
2022-07-23 01:10:58 -07:00
David Tolnay
3d30605f5b
Delegate WRITE and WRITE_BREAK macros to function
2022-07-23 01:10:57 -07:00
David Tolnay
e73ae32cec
Replace PUT_BREAK macro with function
2022-07-23 01:10:56 -07:00
David Tolnay
473f07b9f1
Replace PUT macro with function
2022-07-23 01:10:56 -07:00
David Tolnay
65b156d981
Remove yaml_char_t conversion from PUT arg
2022-07-23 01:10:55 -07:00
David Tolnay
4d9cd1d6b2
Replace FLUSH macro with function
2022-07-23 01:10:54 -07:00
David Tolnay
69a3671ee4
Replace SKIP_TOKEN macro with function
2022-07-23 01:10:54 -07:00
David Tolnay
96b8563adb
Ignore while_immutable_condition clippy false positive
...
https://github.com/rust-lang/rust-clippy/issues/3548
error: variables in the condition are not mutated in the loop body
--> src/scanner.rs:1031:15
|
1031 | while CHECK!((*parser).buffer, b' ')
| _______________^
1032 | | || ((*parser).flow_level != 0 || (*parser).simple_key_allowed == 0)
1033 | | && CHECK!((*parser).buffer, b'\t')
| |__________________________________________________^
|
= note: `-D clippy::while-immutable-condition` implied by `-D clippy::all`
= note: this may lead to an infinite or to a never running loop
= note: this loop contains `return`s or `break`s
= help: rewrite it as `if cond { loop { } }`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_immutable_condition
error: variables in the condition are not mutated in the loop body
--> src/macros.rs:138:9
|
138 | *$string.pointer >= b'0' && *$string.pointer <= b'9'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/scanner.rs:1319:11
|
1319 | while IS_DIGIT!((*parser).buffer) {
| --------------------------- in this macro invocation
|
= note: this may lead to an infinite or to a never running loop
= note: this loop contains `return`s or `break`s
= help: rewrite it as `if cond { loop { } }`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_immutable_condition
= note: this error originates in the macro `IS_DIGIT` (in Nightly builds, run with -Z macro-backtrace for more info)
2022-07-23 01:10:53 -07:00
David Tolnay
5b459eb8fe
Replace PEEK_TOKEN macro with function
2022-07-23 01:10:52 -07:00
David Tolnay
76c107d6a5
Replace CACHE macro with function
2022-07-23 01:10:52 -07:00
David Tolnay
3b233d13a2
Delegate READ and READ_LINE macros to function
2022-07-23 01:10:51 -07:00
David Tolnay
f6bdfbdabe
Replace SKIP_LINE macro with function
2022-07-23 01:10:51 -07:00
David Tolnay
170745c295
Replace SKIP macro with function
2022-07-23 01:10:50 -07:00
David Tolnay
58824ef3b3
Clean up COPY macro implementation
2022-07-23 01:10:49 -07:00
David Tolnay
0358f5b077
Reduce integer casting in macros
2022-07-23 01:10:49 -07:00
David Tolnay
924ba2d634
Simplify MOVE macro
2022-07-23 01:10:48 -07:00
David Tolnay
c5de022daa
Replace NULL_STRING macro with const
2022-07-23 01:10:47 -07:00
David Tolnay
e245fc53a8
Remove yaml_char_t conversion from CHECK args
2022-07-23 01:10:43 -07:00
David Tolnay
c52336a746
Delete unused macros
2022-07-23 01:09:56 -07:00
David Tolnay
e7ea1987ba
Clean up yaml_char_t casts
2022-07-23 01:09:53 -07:00
David Tolnay
049c8c1f6a
Factor out CHECK macro
2022-07-23 01:09:29 -07:00
David Tolnay
2e94cd3bdb
Factor out CHECK_AT macro
2022-07-22 19:03:36 -07:00
David Tolnay
d9917668b4
Factor out WIDTH macro
2022-07-22 18:37:14 -07:00
David Tolnay
440e55a6af
Factor out WIDTH_AT macro
2022-07-22 18:32:04 -07:00
David Tolnay
5305f1811a
Factor out IS_SPACE_AT macro
2022-07-22 18:30:00 -07:00
David Tolnay
fe99a3a5e1
Factor out IS_SPACE macro
2022-07-22 18:27:25 -07:00
David Tolnay
7415f3bfdf
Factor out IS_Z macro
2022-07-22 18:23:23 -07:00
David Tolnay
531dbb76e6
Factor out IS_BOM macro
2022-07-22 18:19:56 -07:00
David Tolnay
6893ddc2b0
Factor out IS_TAB macro
2022-07-22 18:17:47 -07:00
David Tolnay
c0143fb033
Factor out IS_CRLF macro
2022-07-22 18:14:39 -07:00
David Tolnay
76c4b57280
Factor out IS_BREAK_AT macro
2022-07-22 18:12:16 -07:00
David Tolnay
048e47b1c5
Factor out IS_BREAK macro
2022-07-22 18:11:43 -07:00
David Tolnay
5281c57de4
Factor out IS_BREAKZ macro
2022-07-22 17:47:34 -07:00
David Tolnay
a1469c85c2
Factor out IS_PRINTABLE macro
2022-07-22 17:39:55 -07:00