Skip to content

Commit f818546

Browse files
committed
util/diesel: Remove obsolete Conn trait
1 parent 36ac593 commit f818546

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/util/diesel.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
use diesel::connection::LoadConnection;
2-
use diesel::pg::Pg;
31
use diesel::result::Error;
42

5-
pub trait Conn: LoadConnection<Backend = Pg> {}
6-
7-
impl<T> Conn for T where T: LoadConnection<Backend = Pg> {}
8-
93
pub fn is_read_only_error(error: &Error) -> bool {
104
matches!(error, Error::DatabaseError(_, info) if info.message().ends_with("read-only transaction"))
115
}

0 commit comments

Comments
 (0)