maybe done refactoring but not tested
This commit is contained in:
parent
f51099b911
commit
e58cf2bbd0
3 changed files with 110 additions and 166 deletions
|
@ -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::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue