diff --git a/src/apply.rs b/src/apply.rs index 4b50bf8..3fa42d1 100644 --- a/src/apply.rs +++ b/src/apply.rs @@ -3,7 +3,7 @@ use log::info; use std::path::Path; use tokio::fs; -use crate::{File, base64_decode}; +use crate::File; pub async fn files(files: &[File], root: &str, dry_run: bool) -> Result<()> { for f in files { diff --git a/src/dls.rs b/src/dls.rs index 70f49d7..6fed287 100644 --- a/src/dls.rs +++ b/src/dls.rs @@ -151,10 +151,10 @@ impl<'t> Host<'t> { self.dls.get_json(format!("hosts/{}", self.name)).await } - pub async fn asset( + pub async fn asset( &self, - asset_name: &str, - ) -> Result>> { + asset_name: N, + ) -> Result> + use> { let req = self.dls.get(format!("hosts/{}/{asset_name}", self.name))?; let resp = do_req(req, &self.dls.token).await?; Ok(resp.bytes_stream()) diff --git a/src/lib.rs b/src/lib.rs index e314765..867896d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -171,7 +171,7 @@ impl FileKind { } impl FilePart { - pub fn content(&self) -> Result, base64::DecodeError> { + pub fn content(&self) -> Result, base64::DecodeError> { use FilePart::*; Ok(match self { Content(content) => Cow::Borrowed(content.as_bytes()),