Skip to content

Commit 9082e7c

Browse files
authored
Fix some nightly build errors (dani-garcia#4657)
1 parent 55fdee3 commit 9082e7c

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

build.rs

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ fn main() {
1717
"You need to enable one DB backend. To build with previous defaults do: cargo build --features sqlite"
1818
);
1919

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+
2027
// Rerun when these paths are changed.
2128
// Someone could have checked-out a tag or specific commit, but no other files changed.
2229
println!("cargo:rerun-if-changed=.git");

src/db/models/attachment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl Attachment {
9595

9696
pub async fn delete(&self, conn: &mut DbConn) -> EmptyResult {
9797
db_run! { conn: {
98-
crate::util::retry(
98+
let _: () = crate::util::retry(
9999
|| diesel::delete(attachments::table.filter(attachments::id.eq(&self.id))).execute(conn),
100100
10,
101101
)

src/db/models/collection.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ impl CollectionUser {
632632

633633
db_run! { conn: {
634634
for user in collectionusers {
635-
diesel::delete(users_collections::table.filter(
635+
let _: () = diesel::delete(users_collections::table.filter(
636636
users_collections::user_uuid.eq(user_uuid)
637637
.and(users_collections::collection_uuid.eq(user.collection_uuid))
638638
))

0 commit comments

Comments
 (0)