create impl for blob

This commit is contained in:
grimhilt
2023-08-04 15:25:51 +02:00
parent cb43a46456
commit d5097727cb
12 changed files with 90 additions and 54 deletions

View File

@@ -16,7 +16,7 @@ impl DownloadFiles {
pub fn new() -> Self {
DownloadFiles {
api_builder: ApiBuilder::new(),
relative_ps: String::from(""),
relative_ps: String::new(),
}
}
@@ -74,7 +74,7 @@ impl DownloadFiles {
if res.status().is_success() {
let body = res.bytes().await.map_err(ApiError::EmptyError)?;
match Self::write_file(p, &body.to_vec()) {
Err(_) => Err(ApiError::Unexpected(String::from(""))),
Err(_) => Err(ApiError::Unexpected(String::new())),
Ok(_) => Ok(()),
}
} else {

View File

@@ -195,7 +195,7 @@ impl ReqProps {
let mut values: Vec<ObjProps> = vec![];
let mut should_get = false;
let mut val: String = String::from("");
let mut val: String = String::new();
let mut content = ObjProps::new();
for event in parser {