Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Rust 0.6 syntax. #1

Merged
merged 3 commits into from Apr 1, 2013
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Remove fail_unless!.

  • Loading branch information
metajack committed Apr 1, 2013
commit 2693ac1f9d59ec7559c3283233aaa8cfc5cb5086
@@ -88,7 +88,7 @@ pub fn Parser(encoding: &str, fix_encoding: bool) -> Parser {
null(), to_unsafe_ptr(&hubbub_parser))
}
};
fail_unless!(hubbub_error == ll::OK);
assert!(hubbub_error == ll::OK);
return Parser {
hubbub_parser: hubbub_parser,
tree_handler: None
@@ -129,7 +129,7 @@ pub impl Parser {
let hubbub_error = ll::parser::hubbub_parser_setopt(self.hubbub_parser,
ll::PARSER_TREE_HANDLER,
cast::transmute(&ptr));
fail_unless!(hubbub_error == ll::OK);
assert!(hubbub_error == ll::OK);
}
}

@@ -139,7 +139,7 @@ pub impl Parser {
let hubbub_error = ll::parser::hubbub_parser_setopt(self.hubbub_parser,
ll::PARSER_DOCUMENT_NODE,
cast::transmute(&node));
fail_unless!(hubbub_error == ll::OK);
assert!(hubbub_error == ll::OK);
}
}

@@ -149,7 +149,7 @@ pub impl Parser {
let hubbub_error = ll::parser::hubbub_parser_setopt(self.hubbub_parser,
ll::PARSER_ENABLE_SCRIPTING,
cast::transmute(&enable));
fail_unless!(hubbub_error == ll::OK);
assert!(hubbub_error == ll::OK);
}
}

@@ -159,7 +159,7 @@ pub impl Parser {
let ptr = vec::raw::to_ptr(data);
let hubbub_error = ll::parser::hubbub_parser_parse_chunk(self.hubbub_parser, ptr,
data.len() as size_t);
fail_unless!(hubbub_error == ll::OK);
assert!(hubbub_error == ll::OK);
}
}

@@ -169,15 +169,15 @@ pub impl Parser {
let ptr = vec::raw::to_ptr(data);
let hubbub_error = ll::parser::hubbub_parser_insert_chunk(self.hubbub_parser, ptr,
data.len() as size_t);
fail_unless!(hubbub_error == ll::OK);
assert!(hubbub_error == ll::OK);
}
}

fn completed(&self) {
unsafe {
debug!("completing");
let hubbub_error = ll::parser::hubbub_parser_completed(self.hubbub_parser);
fail_unless!(hubbub_error == ll::OK);
assert!(hubbub_error == ll::OK);
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.