Skip to content

Commit

Permalink
Fix parse types
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Khateev <[email protected]>
  • Loading branch information
Nikita Khateev committed Jul 31, 2019
1 parent 7c77652 commit 4b29c26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libindy/tests/utils/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ pub fn parse_get_payment_sources_response(payment_method: &str, resp_json: &str)
payments::parse_get_payment_sources_response(payment_method, resp_json).wait()
}

pub fn parse_get_payment_sources_with_from_response(payment_method: &str, resp_json: &str) -> Result<(String, Option<u64>), IndyError> {
pub fn parse_get_payment_sources_with_from_response(payment_method: &str, resp_json: &str) -> Result<(String, Option<i64>), IndyError> {
payments::parse_get_payment_sources_with_from_response(payment_method, resp_json).wait()
}

Expand Down
4 changes: 2 additions & 2 deletions wrappers/rust/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,12 @@ fn _parse_get_payment_sources_response(command_handle: CommandHandle, payment_me
/// extra: <str>, // optional data from payment transaction
/// }]
/// next -- pointer to the next slice of payment sources
pub fn parse_get_payment_sources_with_from_response(payment_method: &str, resp_json: &str) -> Box<Future<Item=(String, Option<u64>), Error=IndyError>> {
pub fn parse_get_payment_sources_with_from_response(payment_method: &str, resp_json: &str) -> Box<Future<Item=(String, Option<i64>), Error=IndyError>> {
let (receiver, command_handle, cb) = ClosureHandler::cb_ec_string_i64();

let err = _parse_get_payment_sources_with_from_response(command_handle, payment_method, resp_json, cb);

Box::new(ResultHandler::str_i64(command_handle, err, receiver).map(|(s, i)| (s, if i >= 0 {Some(i as u64)} else {None})).into_future())
Box::new(ResultHandler::str_i64(command_handle, err, receiver).map(|(s, i)| (s, if i >= 0 {Some(i)} else {None})).into_future())
}

fn _parse_get_payment_sources_with_from_response(command_handle: CommandHandle, payment_method: &str, resp_json: &str, cb: Option<ResponseStringI64CB>) -> ErrorCode {
Expand Down

0 comments on commit 4b29c26

Please sign in to comment.