Replies: 5 comments 5 replies
-
|
Shorter is more convenient, so I prefer it. |
Beta Was this translation helpful? Give feedback.
-
|
Done in #1730 |
Beta Was this translation helpful? Give feedback.
-
|
Non-uniformity has started to kreep in again (my fault) since we created This applies to Option 1: use crate::Amount;vs Option 2: use units::Amount;My justification for starting to favour option 1 is that I started to think that downstream would copy what we do and we are explicitly trying to 'hide' Should we update policy to be:
Example use core::fmt;
use hashes::sha256;
use internals::write_err;
use crate::{Amount, FeeRate}; |
Beta Was this translation helpful? Give feedback.
-
|
hmm, found an anomaly. We have chosen to claim that use crate::parse::{self, ParseIntError, PrefixedHexError, UnprefixedHexError};seems worse than use units::parse::{self, ParseIntError, PrefixedHexError, UnprefixedHexError}; |
Beta Was this translation helpful? Give feedback.
-
|
This discussion is done with once these PRs merge: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently there is more than one way to write import statements in
rust-bitcoin. Should we have a policy that restricts it to a single way or does it not matter? Would there be any improvement in clarity if we had such a policy?We are using
rustfmtconfig optiongroup_imports = "StdExternalCrate" # Default "Preserve"which groups external crates together however we re-export a bunch of crates, both that we control and that we do not (e.g.,hashes,base64). So one can writeas well as:
Should we use
use crate::foofor all crates that we control (i.e., ones in rust-bitcoin org) and reserve external crates for crates that are fully external?Feel free to say a friendly "your overthinking it too much Tobin" if that is the case, I will not be offended.
Beta Was this translation helpful? Give feedback.
All reactions