diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2024-11-22 15:43:01 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-11-22 15:43:01 +0200 |
| commit | 10dcde18ad2c02df9d0294d75cfa5ef01f53ada3 (patch) | |
| tree | 8144790fc06c46a3377119accfa1a0ef7c0b661b /py_bindings/src | |
| parent | 8117ffb577a6fabb182604604dcec84f1b16affa (diff) | |
Use specialized DBError type instead of io::Error
Diffstat (limited to 'py_bindings/src')
| -rw-r--r-- | py_bindings/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/py_bindings/src/lib.rs b/py_bindings/src/lib.rs index ed63029..aa79680 100644 --- a/py_bindings/src/lib.rs +++ b/py_bindings/src/lib.rs @@ -98,7 +98,9 @@ impl Config { config.write_durability(tmp.write_durability.clone()); } - let db = config.initialize().map_err(|e| PyException::new_err(e))?; + let db = config + .initialize() + .map_err(|e| PyException::new_err(e.to_string()))?; Ok(DB { db }) } } @@ -177,7 +179,7 @@ impl DB { self.db .upsert(&log_db::Record::from(&values)) - .map_err(|e| PyException::new_err(e))?; + .map_err(|e| PyException::new_err(e.to_string()))?; Ok(()) } |
