Skip to content

Conversation

@BrianBland
Copy link
Collaborator

Implements the Drop trait on the Database so that it automatically closes the if not already explicitly closed.

Fixes naming of isClosed -> is_closed

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Feb 26, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

pub fn close(&self, metadata: &Metadata) -> Result<(), Error> {
let mut inner = self.inner.write().unwrap();

if inner.isClosed() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the golang in me coming out lol

@BrianBland BrianBland merged commit f883d1e into main Feb 26, 2025
4 checks passed
@BrianBland BrianBland deleted the brianbland/clean-up-db-close branch February 28, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants