Remove old `Profile::paths` function

This commit is contained in:
Alexis Sellier 2023-01-25 12:09:43 +01:00
parent b4f44f39f2
commit b1012014fe
No known key found for this signature in database
4 changed files with 5 additions and 10 deletions

View File

@ -128,7 +128,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
if options.refs {
let path = profile
.paths()
.home
.storage()
.join(id.urn())
.join("refs")

View File

@ -81,7 +81,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
let id = options.id;
if let Ok(Some(_)) = storage.get(signer.public_key(), id.to_owned()) {
let namespace = profile.paths().storage().join(id.urn());
let namespace = profile.home.storage().join(id.urn());
if !options.confirm
|| term::confirm(format!(

View File

@ -86,19 +86,19 @@ fn all(profile: &Profile) -> anyhow::Result<()> {
let ssh_long = ssh::fmt::key(node_id);
table.push(["Key (full)", &term::format::tertiary(ssh_long)]);
let storage_path = profile.paths().storage();
let storage_path = profile.home.storage();
table.push([
"Storage (git)",
&term::format::tertiary(storage_path.display()),
]);
let keys_path = profile.paths().keys();
let keys_path = profile.home.keys();
table.push([
"Storage (keys)",
&term::format::tertiary(keys_path.display()),
]);
let node_path = profile.paths().node();
let node_path = profile.home.node();
table.push([
"Node (socket)",
&term::format::tertiary(node_path.join("radicle.sock").display()),

View File

@ -137,11 +137,6 @@ impl Profile {
pub fn socket(&self) -> PathBuf {
self.home.socket()
}
/// Get `Paths` of profile
pub fn paths(&self) -> &Home {
&self.home
}
}
/// Get the path to the radicle home folder.