mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 05:48:56 +08:00 
			
		
		
		
	No longer panic if we fail to close the connection when dropping it.
This commit is contained in:
		| @@ -371,15 +371,7 @@ impl Drop for InnerConnection { | ||||
|     #[allow(unused_must_use)] | ||||
|     #[inline] | ||||
|     fn drop(&mut self) { | ||||
|         use std::thread::panicking; | ||||
|  | ||||
|         if let Err(e) = self.close() { | ||||
|             if panicking() { | ||||
|                 eprintln!("Error while closing SQLite connection: {e:?}"); | ||||
|             } else { | ||||
|                 panic!("Error while closing SQLite connection: {:?}", e); | ||||
|             } | ||||
|         } | ||||
|         self.close(); | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user