We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Conn
1 parent 36ac593 commit f818546Copy full SHA for f818546
src/util/diesel.rs
@@ -1,11 +1,5 @@
1
-use diesel::connection::LoadConnection;
2
-use diesel::pg::Pg;
3
use diesel::result::Error;
4
5
-pub trait Conn: LoadConnection<Backend = Pg> {}
6
-
7
-impl<T> Conn for T where T: LoadConnection<Backend = Pg> {}
8
9
pub fn is_read_only_error(error: &Error) -> bool {
10
matches!(error, Error::DatabaseError(_, info) if info.message().ends_with("read-only transaction"))
11
}
0 commit comments