Skip to content

Commit c385e09

Browse files
committed
moar cleanup
1 parent 81265d9 commit c385e09

File tree

4 files changed

+224
-712
lines changed

4 files changed

+224
-712
lines changed

src/diff.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ pub fn write_package_diff(
259259
.map_err(Error::from);
260260

261261
tracing::info!(diff_count = ?count.as_ref().ok(), "package diff complete");
262+
263+
connection.close()?;
264+
262265
count
263266
}
264267

@@ -861,10 +864,14 @@ pub fn spawn_size_diff(
861864
let mut connection = create_backend(force_correctness);
862865
connection.connect()?;
863866

864-
Ok::<_, Error>((
867+
let result = (
865868
connection.query_closure_size(&path_old)?,
866869
connection.query_closure_size(&path_new)?,
867-
))
870+
);
871+
872+
connection.close()?;
873+
874+
Ok::<_, Error>(result)
868875
})
869876
}
870877

src/store.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![allow(clippy::mem_forget)]
21
//! Provides an interface for querying data from the nix store.
32
//!
43
//! - [`LazyDBConnection`] is a lazy connection the underlying sqlite database.
@@ -10,10 +9,6 @@ mod queries;
109

1110
#[cfg(test)] mod test_utils;
1211

13-
pub mod store {
14-
pub use crate::store::db_lazy::LazyDBConnection;
15-
}
16-
1712
use std::{
1813
fmt::Display,
1914
iter::Iterator,
@@ -31,8 +26,8 @@ use crate::{
3126
StorePath,
3227
store::{
3328
db_eager::EagerDBConnection,
29+
db_lazy::LazyDBConnection,
3430
nix_command::CommandBackend,
35-
store::LazyDBConnection,
3631
},
3732
};
3833
/// The normal database connection

0 commit comments

Comments
 (0)