Skip to content

Commit d094aa6

Browse files
committed
Build docs with cargo
1 parent b76b581 commit d094aa6

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ before_script:
1010
script:
1111
- cargo test
1212
- rustdoc -L target/test -L target/test/deps --test src/lib/lib.rs
13-
- rustdoc -L target/test/deps src/lib/lib.rs
13+
- cargo doc --no-deps
1414
after_script:
15+
- mv target/doc .
1516
- curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh

src/test/test.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,6 @@ fn test_lazy_query() {
407407
let stmt = or_fail!(trans.prepare("SELECT id FROM foo ORDER BY id"));
408408
let result = or_fail!(trans.lazy_query(&stmt, [], 2));
409409
assert_eq!(values, result.map(|row| row.unwrap().get(0u)).collect());
410-
411-
trans.set_rollback();
412410
}
413411

414412
#[test]
@@ -475,9 +473,7 @@ fn test_too_few_params() {
475473
#[test]
476474
fn test_too_many_params() {
477475
let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost", &NoSsl));
478-
match conn.execute("SELECT $1::INT, $2::INT", [&1i32,
479-
&2i32,
480-
&3i32]) {
476+
match conn.execute("SELECT $1::INT, $2::INT", [&1i32, &2i32, &3i32]) {
481477
Err(PgWrongParamCount { expected: 2, actual: 3 }) => {},
482478
res => fail!("unexpected result {}", res)
483479
}
@@ -538,7 +534,8 @@ fn test_custom_notice_handler() {
538534
}
539535
}
540536

541-
let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost?client_min_messages=NOTICE", &NoSsl));
537+
let conn = or_fail!(PostgresConnection::connect(
538+
"postgres://postgres@localhost?client_min_messages=NOTICE", &NoSsl));
542539
conn.set_notice_handler(box Handler);
543540
or_fail!(conn.execute("CREATE FUNCTION pg_temp.note() RETURNS INT AS $$
544541
BEGIN

0 commit comments

Comments
 (0)