-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix #6209 - introduce standalone dir crate #6952
Conversation
Done so far: * created the dir crate in util * moved code from `ethstore/src/dir/paths.rs` to dir crate * rename `dir` module in ethstore to `accounts_dir` to distinguish it from the dir crate Is there a need to mutualize some code in the newly created `util/dir/src/lib.rs` ? If so, I would need some guidance as of which functions are to be mutualized.
It looks like @nicolasochem signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
@@ -21,7 +21,8 @@ use std::collections::HashSet; | |||
|
|||
use dapps; | |||
use dir::default_data_path; | |||
use helpers::{parity_ipc_path, replace_home}; | |||
use helpers::parity_ipc_path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you keep the imports sorted?
r.replace("/", &::std::path::MAIN_SEPARATOR.to_string()) | ||
} | ||
|
||
pub fn replace_home_and_local(base: &str, local: &str, arg: &str) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc missing.
@@ -14,7 +14,12 @@ | |||
// You should have received a copy of the GNU General Public License | |||
// along with Parity. If not, see <http://www.gnu.org/licenses/>. | |||
|
|||
use std::fs; | |||
extern crate app_dirs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add #![warn(missing_docs)]
base | ||
} | ||
|
||
#[cfg(target_os = "macos")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to group the functions into a platform
module:
#[cfg(target_os = "macos")]
mod platform {
fn parity_base() {}
fn geth_base() {}
}
@nicolasochem any progress? |
* created the dir crate in util * moved code from ethstore/src/dir/paths.rs to dir crate * rename dir module in ethstore to accounts_dir to distinguish it from the dir crate * changes after @tomusdrw on openethereum#6952
replaced by #7383 |
* created the dir crate in util * moved code from ethstore/src/dir/paths.rs to dir crate * rename dir module in ethstore to accounts_dir to distinguish it from the dir crate * changes after @tomusdrw on openethereum#6952
Done so far:
ethstore/src/dir/paths.rs
to dir cratedir
module in ethstore toaccounts_dir
to distinguish itfrom the dir crate
Is there a need to mutualize some code in the newly created
util/dir/src/lib.rs
? If so, I would need some guidance as of whichfunctions are to be mutualized.