Skip to content

Commit

Permalink
minor modifications:
Browse files Browse the repository at this point in the history
* removed some (useless?) output
* also ran clippy, note there is a warning about:
```
warning: cannot find type `As` in this scope
  --> src/oracle/query_builder/alias.rs:17:24
   |
17 | #[derive(Debug, Clone, QueryId)]
   |                        ^^^^^^^ names from parent modules are not accessible without an explicit import
   |
   = note: #[warn(proc_macro_derive_resolution_fallback)] on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #50504 <rust-lang/rust#50504>
```
which seems to be fixed with diesel-rs/diesel#1787 which has not been released yet
  • Loading branch information
pgab committed Sep 5, 2018
1 parent 4ac0744 commit 056ef19
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ fn database_url_from_env(backend_specific_env_var: &str) -> String {
dotenv().ok();
match env::var(backend_specific_env_var) {
Ok(val) => {
println!(r#"cargo:rustc-cfg=feature="backend_specific_database_url""#);
val
}
_ => env::var("OCI_DATABASE_URL")
Expand Down Expand Up @@ -1519,7 +1518,7 @@ fn transaction_nested_rollback_rollback_rollback() {
self::test::dsl::test.load::<(Option<i64>, Option<String>, Option<i64>)>(&conn)?;
assert_eq!(ret_inner.len(), 2);

let inner_inner = conn.transaction::<i32, Error, _>(|| {
let _inner_inner = conn.transaction::<i32, Error, _>(|| {
let sql_inner_inner = format!("INSERT INTO test ({}) VALUES ({})", "TST_CHR", TEST_VARCHAR);
let _ret_inner_inner = conn.execute(&*sql_inner_inner)?;
let ret_inner_inner =
Expand Down Expand Up @@ -1567,7 +1566,7 @@ fn transaction_nested_rollback_rollback_commit() {
self::test::dsl::test.load::<(Option<i64>, Option<String>, Option<i64>)>(&conn)?;
assert_eq!(ret_inner.len(), 2);

let inner_inner = conn.transaction::<_, Error, _>(|| {
let _inner_inner = conn.transaction::<_, Error, _>(|| {
let sql_inner_inner = format!("INSERT INTO test ({}) VALUES ({})", "TST_CHR", TEST_VARCHAR);
let _ret_inner_inner = conn.execute(&*sql_inner_inner)?;
let ret_inner_inner =
Expand Down Expand Up @@ -1615,7 +1614,7 @@ fn transaction_nested_commit_commit_commit() {
self::test::dsl::test.load::<(Option<i64>, Option<String>, Option<i64>)>(&conn)?;
assert_eq!(ret_inner.len(), 2);

let inner_inner = conn.transaction::<_, Error, _>(|| {
let _inner_inner = conn.transaction::<_, Error, _>(|| {
let sql_inner_inner = format!("INSERT INTO test ({}) VALUES ({})", "TST_CHR", TEST_VARCHAR);
let _ret_inner_inner = conn.execute(&*sql_inner_inner)?;
let ret_inner_inner =
Expand Down Expand Up @@ -1662,7 +1661,7 @@ fn transaction_nested_commit_commit_rollback() {
self::test::dsl::test.load::<(Option<i64>, Option<String>, Option<i64>)>(&conn)?;
assert_eq!(ret_inner.len(), 2);

let inner_inner = conn.transaction::<i32, Error, _>(|| {
let _inner_inner = conn.transaction::<i32, Error, _>(|| {
let sql_inner_inner = format!("INSERT INTO test ({}) VALUES ({})", "TST_CHR", TEST_VARCHAR);
let _ret_inner_inner = conn.execute(&*sql_inner_inner)?;
let ret_inner_inner =
Expand Down Expand Up @@ -1709,7 +1708,7 @@ fn transaction_nested_commit_rollback_rollback() {
self::test::dsl::test.load::<(Option<i64>, Option<String>, Option<i64>)>(&conn)?;
assert_eq!(ret_inner.len(), 2);

let inner_inner = conn.transaction::<i32, Error, _>(|| {
let _inner_inner = conn.transaction::<i32, Error, _>(|| {
let sql_inner_inner = format!("INSERT INTO test ({}) VALUES ({})", "TST_CHR", TEST_VARCHAR);
let _ret_inner_inner = conn.execute(&*sql_inner_inner)?;
let ret_inner_inner =
Expand Down Expand Up @@ -1756,7 +1755,7 @@ fn transaction_nested_rollback_commit_commit() {
self::test::dsl::test.load::<(Option<i64>, Option<String>, Option<i64>)>(&conn)?;
assert_eq!(ret_inner.len(), 2);

let inner_inner = conn.transaction::<_, Error, _>(|| {
let _inner_inner = conn.transaction::<_, Error, _>(|| {
let sql_inner_inner = format!("INSERT INTO test ({}) VALUES ({})", "TST_CHR", TEST_VARCHAR);
let _ret_inner_inner = conn.execute(&*sql_inner_inner)?;
let ret_inner_inner =
Expand Down Expand Up @@ -1804,7 +1803,7 @@ fn transaction_nested_commit_rollback_commit() {
self::test::dsl::test.load::<(Option<i64>, Option<String>, Option<i64>)>(&conn)?;
assert_eq!(ret_inner.len(), 2);

let inner_inner = conn.transaction::<_, Error, _>(|| {
let _inner_inner = conn.transaction::<_, Error, _>(|| {
let sql_inner_inner = format!("INSERT INTO test ({}) VALUES ({})", "TST_CHR", TEST_VARCHAR);
let _ret_inner_inner = conn.execute(&*sql_inner_inner)?;
let ret_inner_inner =
Expand Down Expand Up @@ -1851,7 +1850,7 @@ fn transaction_nested_rollback_commit_rollback() {
self::test::dsl::test.load::<(Option<i64>, Option<String>, Option<i64>)>(&conn)?;
assert_eq!(ret_inner.len(), 2);

let inner_inner = conn.transaction::<i32, Error, _>(|| {
let _inner_inner = conn.transaction::<i32, Error, _>(|| {
let sql_inner_inner = format!("INSERT INTO test ({}) VALUES ({})", "TST_CHR", TEST_VARCHAR);
let _ret_inner_inner = conn.execute(&*sql_inner_inner)?;
let ret_inner_inner =
Expand Down

0 comments on commit 056ef19

Please sign in to comment.