cleaning imports and warnings

This commit is contained in:
grimhilt
2023-06-17 01:26:13 +02:00
parent ea2b0772af
commit b16058b4d3
7 changed files with 15 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
use crate::services::api::{ApiBuilder, ApiError};
use std::path::PathBuf;
use reqwest::{Method, IntoUrl, Response, Error};
use reqwest::{Method, Response, Error};
use crate::utils::api::get_local_path_t;
use std::fs::OpenOptions;
use std::io::{self, Write};
@@ -28,7 +28,7 @@ impl DownloadFiles {
self.api_builder.send().await
}
pub async fn send_with_err(mut self) -> Result<Vec<u8>, ApiError> {
pub async fn _send_with_err(mut self) -> Result<Vec<u8>, ApiError> {
let res = self.send().await.map_err(ApiError::RequestError)?;
if res.status().is_success() {
let body = res.bytes().await.map_err(ApiError::EmptyError)?;

View File

@@ -35,25 +35,25 @@ impl ReqProps {
self
}
pub fn getcontenttype(&mut self) -> &mut ReqProps {
pub fn _getcontenttype(&mut self) -> &mut ReqProps {
self.xml_list.push(String::from("getcontenttype"));
self.xml_payload.push_str(r#"<d:getcontenttype/>"#);
self
}
pub fn getpermissions(&mut self) -> &mut ReqProps {
pub fn _getpermissions(&mut self) -> &mut ReqProps {
self.xml_list.push(String::from("permissions"));
self.xml_payload.push_str(r#"<oc:permissions/>"#);
self
}
pub fn getressourcetype(&mut self) -> &mut ReqProps {
pub fn _getressourcetype(&mut self) -> &mut ReqProps {
self.xml_list.push(String::from("resourcetype"));
self.xml_payload.push_str(r#"<d:resourcetype/>"#);
self
}
pub fn getetag(&mut self) -> &mut ReqProps {
pub fn _getetag(&mut self) -> &mut ReqProps {
self.xml_list.push(String::from("getetag"));
self.xml_payload.push_str(r#"<d:getetag/>"#);
self