aboutsummaryrefslogtreecommitdiff
path: root/src/utils/mod.rs
diff options
context:
space:
mode:
authorAndreas Fuchs2020-11-25 19:20:17 -0500
committernotgne22020-12-02 10:24:23 -0700
commitc1e0f5a9c9f6402703aece1581fd00ab20f71ded (patch)
treef15eb7a18ab6c4d36efa3ecb5bb4aad949d29db9 /src/utils/mod.rs
parent4af6b8114e1edb8d8280e10ab295c1cacef94136 (diff)
Use DeployData's store path to build the activate-rs path
This gets rid of yet more code, so - win!
Diffstat (limited to 'src/utils/mod.rs')
-rw-r--r--src/utils/mod.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/utils/mod.rs b/src/utils/mod.rs
index 6052813..02ea85b 100644
--- a/src/utils/mod.rs
+++ b/src/utils/mod.rs
@@ -312,23 +312,3 @@ pub enum DeployPathToActivatePathError {
#[error("Deploy path was not valid utf8")]
InvalidUtf8,
}
-
-pub fn deploy_path_to_activate_path_str(
- deploy_defs: &DeployDefs,
-) -> Result<String, DeployPathToActivatePathError> {
- Ok(format!("{}/activate-rs", deploy_defs.profile_path))
-}
-
-#[test]
-fn test_activate_path_generation() {
- let defs = DeployDefs {
- ssh_user: "foo".to_string(),
- profile_user: "bar".to_string(),
- profile_path: "/nix/store/profile-closure".to_string(),
- sudo: None,
- };
- match deploy_path_to_activate_path_str(&defs) {
- Err(_) => panic!(""),
- Ok(x) => assert_eq!(x, "/nix/store/profile-closure/activate-rs".to_string()),
- }
-}