bobozaur / sqlx-exasol

An Exasol database driver for the Rust SQLx framework
Apache License 2.0
1 stars 0 forks source link

Tweak ExaConnectOptionsBuilder methods to consume self #10

Closed bobozaur closed 1 year ago

bobozaur commented 1 year ago

ExaConnectOptionsBuilder setters take &mut self, but building the ExaConnectOptions requires ownership. The type was initially made to be used internally and only afterwards made public, but this design makes method chaining and building impossible.

Therefore, it might be better to simply take mut self in setters to make the builder more ergonomic for consumer code.