Refactor naming

This commit is contained in:
Tobias Reisinger 2023-11-26 22:46:08 +01:00
parent a9fd240bd3
commit ad58ab9bdd
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
10 changed files with 66 additions and 62 deletions

View file

@ -3,17 +3,18 @@ use std::process::exit;
use telnet::Telnet;
use crate::cli::Commands;
use crate::response::channel::ResponseChannel;
use crate::response::client::ResponseClient;
use crate::models::Channel;
use crate::models::Client;
mod response;
mod wrappers;
mod commands;
mod parameter;
mod cli;
mod utils;
mod models;
mod response;
fn channel_or_exit(channel_res: Result<Option<ResponseChannel>, String>) -> ResponseChannel {
fn channel_or_exit(channel_res: Result<Option<Channel>, String>) -> Channel {
channel_res.unwrap_or_else(|err| {
println!("Failed to find channel: {}", err);
exit(1);
@ -24,7 +25,7 @@ fn channel_or_exit(channel_res: Result<Option<ResponseChannel>, String>) -> Resp
})
}
fn client_or_exit(client_res: Result<Option<ResponseClient>, String>) -> ResponseClient {
fn client_or_exit(client_res: Result<Option<Client>, String>) -> Client {
client_res.unwrap_or_else(|err| {
println!("Failed to find client: {}", err);
exit(1);