Skip to content

Commit 749d992

Browse files
committed
Removed default type parameters on ret, bind and then
See rust-lang/rust#30724 Fixes #32
1 parent 2c4469c commit 749d992

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/input.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl<'a, I> Input<'a, I> {
121121
/// assert_eq!(r, Ok("Wohoo, success!"));
122122
/// ```
123123
#[inline]
124-
pub fn ret<T, E = ()>(self, t: T) -> ParseResult<'a, I, T, E> {
124+
pub fn ret<T, E>(self, t: T) -> ParseResult<'a, I, T, E> {
125125
parse_result::new(State::Data(self, t))
126126
}
127127

src/parse_result.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl<'a, I, T, E> ParseResult<'a, I, T, E> {
139139
/// assert_eq!(r, Ok(33));
140140
/// ```
141141
#[inline]
142-
pub fn bind<F, U, V = E>(self, f: F) -> ParseResult<'a, I, U, V>
142+
pub fn bind<F, U, V>(self, f: F) -> ParseResult<'a, I, U, V>
143143
where F: FnOnce(Input<'a, I>, T) -> ParseResult<'a, I, U, V>,
144144
V: From<E> {
145145
match self.0 {
@@ -176,7 +176,7 @@ impl<'a, I, T, E> ParseResult<'a, I, T, E> {
176176
/// assert_eq!(r2, Ok("testing!"));
177177
/// ```
178178
#[inline]
179-
pub fn then<F, U, V = E>(self, f: F) -> ParseResult<'a, I, U, V>
179+
pub fn then<F, U, V>(self, f: F) -> ParseResult<'a, I, U, V>
180180
where F: FnOnce(Input<'a, I>) -> ParseResult<'a, I, U, V>,
181181
V: From<E> {
182182
self.bind(|i, _| f(i))

0 commit comments

Comments
 (0)