File tree 3 files changed +9
-2
lines changed
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,13 @@ fn main() {
17
17
"You need to enable one DB backend. To build with previous defaults do: cargo build --features sqlite"
18
18
) ;
19
19
20
+ // Use check-cfg to let cargo know which cfg's we define,
21
+ // and avoid warnings when they are used in the code.
22
+ println ! ( "cargo::rustc-check-cfg=cfg(sqlite)" ) ;
23
+ println ! ( "cargo::rustc-check-cfg=cfg(mysql)" ) ;
24
+ println ! ( "cargo::rustc-check-cfg=cfg(postgresql)" ) ;
25
+ println ! ( "cargo::rustc-check-cfg=cfg(query_logger)" ) ;
26
+
20
27
// Rerun when these paths are changed.
21
28
// Someone could have checked-out a tag or specific commit, but no other files changed.
22
29
println ! ( "cargo:rerun-if-changed=.git" ) ;
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ impl Attachment {
95
95
96
96
pub async fn delete ( & self , conn : & mut DbConn ) -> EmptyResult {
97
97
db_run ! { conn: {
98
- crate :: util:: retry(
98
+ let _ : ( ) = crate :: util:: retry(
99
99
|| diesel:: delete( attachments:: table. filter( attachments:: id. eq( & self . id) ) ) . execute( conn) ,
100
100
10 ,
101
101
)
Original file line number Diff line number Diff line change @@ -632,7 +632,7 @@ impl CollectionUser {
632
632
633
633
db_run ! { conn: {
634
634
for user in collectionusers {
635
- diesel:: delete( users_collections:: table. filter(
635
+ let _ : ( ) = diesel:: delete( users_collections:: table. filter(
636
636
users_collections:: user_uuid. eq( user_uuid)
637
637
. and( users_collections:: collection_uuid. eq( user. collection_uuid) )
638
638
) )
You can’t perform that action at this time.
0 commit comments