maybe done refactoring but not tested

This commit is contained in:
cy 2025-04-13 03:27:55 -04:00
parent f51099b911
commit e58cf2bbd0
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
3 changed files with 110 additions and 166 deletions

View file

@ -8,7 +8,7 @@ use tokio::process::Command;
use url::Url;
// nix path-info --derivation --json
#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PathInfo {
deriver: String,
@ -103,6 +103,12 @@ impl PathInfo {
}
}
impl ToString for PathInfo {
fn to_string(&self) -> String {
self.path.clone()
}
}
#[cfg(test)]
mod tests {
use super::*;