Skip to content

Commit d567ca8

Browse files
committed
Restructure directories for rustpkg
Turns out the src/postgres indirection isn't necessary.
1 parent d65d5bc commit d567ca8

7 files changed

Lines changed: 17 additions & 18 deletions

File tree

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@ install:
66
before_script:
77
- ./travis/setup.sh
88
script:
9-
- rustc --lib --out-dir . src/postgres/lib.rs
10-
- rustc --test --out-dir . -L. --cfg travis src/postgres/test.rs
9+
- rustc --test --cfg travis -o test lib.rs
1110
- ./test
12-
# - rustpkg test postgres
File renamed without changes.

src/postgres/lib.rs renamed to lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ pub mod pool;
126126
mod message;
127127
pub mod types;
128128

129+
#[cfg(test)]
130+
mod test;
131+
129132
/// Trait for types that can handle Postgres notice messages
130133
pub trait PostgresNoticeHandler {
131134
/// Handle a Postgres notice message
File renamed without changes.
File renamed without changes.
Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
extern mod extra;
2-
extern mod postgres;
32

43
use extra::comm::DuplexStream;
54
use extra::future::Future;
@@ -11,20 +10,19 @@ use extra::uuid::Uuid;
1110
use std::f32;
1211
use std::f64;
1312

14-
use postgres::{PostgresNoticeHandler,
15-
PostgresNotification,
16-
DbError,
17-
DnsError,
18-
MissingPassword,
19-
Position,
20-
PostgresConnection,
21-
PostgresDbError,
22-
PostgresStatement,
23-
ResultDescription};
24-
use postgres::error::hack::{SyntaxError, InvalidPassword};
25-
use postgres::types::{ToSql, FromSql, PgInt4, PgVarchar};
26-
use postgres::pool::PostgresConnectionPool;
27-
13+
use super::{PostgresNoticeHandler,
14+
PostgresNotification,
15+
DbError,
16+
DnsError,
17+
MissingPassword,
18+
Position,
19+
PostgresConnection,
20+
PostgresDbError,
21+
PostgresStatement,
22+
ResultDescription};
23+
use super::error::hack::{SyntaxError, InvalidPassword};
24+
use super::types::{ToSql, FromSql, PgInt4, PgVarchar};
25+
use super::pool::PostgresConnectionPool;
2826

2927
#[test]
3028
// Make sure we can take both connections at once and can still get one after
File renamed without changes.

0 commit comments

Comments
 (0)