duckdb-rs
duckdb-rs copied to clipboard
Enums should implement Clone and non consumed values should be taken by reference
Hello,
I am working on a DuckDB driver implementation for Sqlx. I see that the enums for connection configuration are do not implement Clone. Moreover is there any reason for for the functions in duckdb::Config to take the enums by value?
https://docs.rs/duckdb/latest/src/duckdb/config.rs.html#63-66
It seems it is not being actually consumed and this, combined with the fact that it is not cloneable is causing quite some boilerplate code and complexity in order to work around it.
Is it possible to derive Clone for those enums and possibly take the enum values by reference?