avoid compiler warnings
This commit is contained in:
@ -20,7 +20,7 @@ fn authenticate_user(username: &str, password: &str) -> Result<(), Error> {
|
||||
fn create_ticket(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: &mut RpcEnvironment,
|
||||
_rpcenv: &mut RpcEnvironment,
|
||||
) -> Result<Value, Error> {
|
||||
|
||||
let username = tools::required_string_param(¶m, "username")?;
|
||||
|
@ -68,7 +68,7 @@ fn get_backup_list(
|
||||
_rpcenv: &mut RpcEnvironment,
|
||||
) -> Result<Value, Error> {
|
||||
|
||||
let config = datastore::config()?;
|
||||
//let config = datastore::config()?;
|
||||
|
||||
let store = param["store"].as_str().unwrap();
|
||||
|
||||
|
@ -8,7 +8,6 @@ use crate::api2::*;
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
use std::io::{BufRead, BufReader};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use openssl::sha;
|
||||
use regex::Regex;
|
||||
@ -61,7 +60,7 @@ fn update_dns(
|
||||
static ref MUTEX: Arc<Mutex<usize>> = Arc::new(Mutex::new(0));
|
||||
}
|
||||
|
||||
let guard = MUTEX.lock();
|
||||
let _guard = MUTEX.lock();
|
||||
|
||||
let search = tools::required_string_param(¶m, "search")?;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use failure::*;
|
||||
|
||||
use crate::tools;
|
||||
//use crate::tools;
|
||||
use crate::api::schema::*;
|
||||
use crate::api::router::*;
|
||||
use serde_json::{json, Value};
|
||||
|
@ -6,8 +6,6 @@ use crate::api::router::*;
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use std::sync::Arc;
|
||||
use lazy_static::lazy_static;
|
||||
use crate::tools::common_regex;
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
static SERVICE_NAME_LIST: [&str; 6] = [
|
||||
@ -91,9 +89,9 @@ fn json_service_state(service: &str, status: Value) -> Value {
|
||||
|
||||
|
||||
fn list_services(
|
||||
param: Value,
|
||||
_param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: &mut RpcEnvironment,
|
||||
_rpcenv: &mut RpcEnvironment,
|
||||
) -> Result<Value, Error> {
|
||||
|
||||
let mut list = vec![];
|
||||
@ -116,7 +114,7 @@ fn list_services(
|
||||
fn get_service_state(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: &mut RpcEnvironment,
|
||||
_rpcenv: &mut RpcEnvironment,
|
||||
) -> Result<Value, Error> {
|
||||
|
||||
let service = tools::required_string_param(¶m, "service")?;
|
||||
@ -161,7 +159,7 @@ fn run_service_command(service: &str, cmd: &str) -> Result<Value, Error> {
|
||||
fn start_service(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: &mut RpcEnvironment,
|
||||
_rpcenv: &mut RpcEnvironment,
|
||||
) -> Result<Value, Error> {
|
||||
|
||||
let service = tools::required_string_param(¶m, "service")?;
|
||||
@ -174,7 +172,7 @@ fn start_service(
|
||||
fn stop_service(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: &mut RpcEnvironment,
|
||||
_rpcenv: &mut RpcEnvironment,
|
||||
) -> Result<Value, Error> {
|
||||
|
||||
let service = tools::required_string_param(¶m, "service")?;
|
||||
@ -187,7 +185,7 @@ fn stop_service(
|
||||
fn restart_service(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: &mut RpcEnvironment,
|
||||
_rpcenv: &mut RpcEnvironment,
|
||||
) -> Result<Value, Error> {
|
||||
|
||||
let service = tools::required_string_param(¶m, "service")?;
|
||||
@ -200,7 +198,7 @@ fn restart_service(
|
||||
fn reload_service(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: &mut RpcEnvironment,
|
||||
_rpcenv: &mut RpcEnvironment,
|
||||
) -> Result<Value, Error> {
|
||||
|
||||
let service = tools::required_string_param(¶m, "service")?;
|
||||
|
@ -1,6 +1,5 @@
|
||||
use failure::*;
|
||||
|
||||
use crate::tools;
|
||||
use crate::api::schema::*;
|
||||
use crate::api::router::*;
|
||||
use serde_json::{json, Value};
|
||||
|
Reference in New Issue
Block a user