Simplify enum objects #39

Merged
modulatingforce merged 5 commits from Simplify-objects into main 2024-03-23 16:50:04 -04:00
2 changed files with 2 additions and 17 deletions
Showing only changes of commit 3a0e00c323 - Show all commits

View file

@ -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)]

View file

@ -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 {