Simplify enum objects #39
2 changed files with 2 additions and 17 deletions
|
@ -43,14 +43,8 @@ pub enum ChangeResult {
|
|||
// pub use ChType::Channel;
|
||||
//
|
||||
//simplifying from enum to struct
|
||||
pub struct Channel(String);
|
||||
impl Channel
|
||||
{
|
||||
pub fn construct(channel_string:String) -> Channel
|
||||
{
|
||||
Channel(channel_string)
|
||||
}
|
||||
}
|
||||
pub struct Channel(pub String);
|
||||
|
||||
use super::botmodules::StatusType;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -40,8 +40,6 @@ use crate::core::identity::{self, Permissible,IdentityManager};
|
|||
|
||||
use crate::core::bot_actions;
|
||||
|
||||
//pub use BotModule;
|
||||
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
use super::identity::ChatBadge;
|
||||
|
@ -416,13 +414,6 @@ pub async fn init(mgr: Arc<ModulesManager>) {
|
|||
// }
|
||||
|
||||
pub struct BotModule(pub String);
|
||||
// //botmodule simplified from enum to tuple struct
|
||||
// impl BotModule{
|
||||
// pub fn construct(module_name:String) -> BotModule
|
||||
// {
|
||||
// BotModule(module_name)
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
impl PartialEq for BotModule {
|
||||
|
|
Loading…
Reference in a new issue