influxdb-rs/influxdb-rust

Prefix `InfluxDb` of type names are redundant

pcpthm opened this issue · 4 comments

Because Rust has nice module system, naming prefixes are usually not used.
Because this crate only deal with the particular type of database, the prefix is really redundant.

Agreed. Is this a best practice? How is working with two Clients done ergonomically (say influxdb::client::Client and reqwest::Client). Would you prefix them with the respective packages in those cases? I chose the InfluxDb prefix so there would be no such ambiguities.

(Assuming influxdb::client::Client made reexported to top-level)
Full path influxdb::Client and reqwest::Client are most used.
Sometimes aliases e.g. use std::result::Result as StdResult; are used.

Reexporting to the top-level seems like the best solution indeed, thanks for the explanation.

Reexporting would be similar/better to #8

Fixed in #27