Refactor naming
This commit is contained in:
parent
a9fd240bd3
commit
ad58ab9bdd
10 changed files with 66 additions and 62 deletions
src
11
src/main.rs
11
src/main.rs
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue