Browse Source

Remove unused plugin interface

jmap-eventsource
Manos Pitsidianakis 1 year ago
parent
commit
7b1ab389fa
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 45
      Cargo.lock
  2. 3
      Cargo.toml
  3. 1
      src/bin.rs
  4. 7
      src/conf.rs
  5. 8
      src/state.rs

45
Cargo.lock

@ -1064,9 +1064,6 @@ dependencies = [
"pcre2",
"proc-macro2",
"quote 1.0.7",
"rmp",
"rmp-serde",
"rmpv",
"serde",
"serde_derive",
"serde_json",
@ -1605,39 +1602,6 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "rmp"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f10b46df14cf1ee1ac7baa4d2fbc2c52c0622a4b82fa8740e37bc452ac0184f"
dependencies = [
"byteorder",
"num-traits",
]
[[package]]
name = "rmp-serde"
version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ce7d70c926fe472aed493b902010bccc17fa9f7284145cb8772fd22fdb052d8"
dependencies = [
"byteorder",
"rmp",
"serde",
]
[[package]]
name = "rmpv"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee358f3c4be83ab373cd3e501dc04881034f1ae198e73b2d9edd617653ac4293"
dependencies = [
"num-traits",
"rmp",
"serde",
"serde_bytes",
]
[[package]]
name = "rusqlite"
version = "0.24.0"
@ -1728,15 +1692,6 @@ dependencies = [
"serde_derive",
]
[[package]]
name = "serde_bytes"
version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9"
dependencies = [
"serde",
]
[[package]]
name = "serde_derive"
version = "1.0.116"

3
Cargo.toml

@ -46,9 +46,6 @@ bincode = "1.2.0"
uuid = { version = "0.8.1", features = ["serde", "v4"] }
unicode-segmentation = "1.2.1" # >:c
libc = {version = "0.2.59", features = ["extra_traits",]}
rmp = "^0.8"
rmpv = { version = "^0.4.2", features=["with-serde",] }
rmp-serde = "^0.14.0"
smallvec = { version = "^1.4.0", features = ["serde", ] }
bitflags = "1.0"
pcre2 = { version = "0.2.3", optional = true }

1
src/bin.rs

@ -79,7 +79,6 @@ pub mod sqlite3;
pub mod jobs;
pub mod mailcap;
pub mod plugins;
use std::os::raw::c_int;

7
src/conf.rs

@ -56,7 +56,6 @@ use self::listing::ListingSettings;
use self::notifications::NotificationsSettings;
use self::terminal::TerminalSettings;
use crate::pager::PagerSettings;
use crate::plugins::Plugin;
use melib::conf::{AccountSettings, MailboxConf, ToggleFlag};
use melib::error::*;
@ -212,8 +211,6 @@ pub struct FileSettings {
#[serde(default)]
pub terminal: TerminalSettings,
#[serde(default)]
pub plugins: IndexMap<String, Plugin>,
#[serde(default)]
pub log: LogSettings,
}
@ -432,7 +429,6 @@ pub struct Settings {
pub composing: ComposingSettings,
pub pgp: PGPSettings,
pub terminal: TerminalSettings,
pub plugins: IndexMap<String, Plugin>,
pub log: LogSettings,
}
@ -465,7 +461,6 @@ impl Settings {
composing: fs.composing,
pgp: fs.pgp,
terminal: fs.terminal,
plugins: fs.plugins,
log: fs.log,
})
}
@ -489,7 +484,6 @@ impl Settings {
composing: fs.composing,
pgp: fs.pgp,
terminal: fs.terminal,
plugins: fs.plugins,
log: fs.log,
})
}
@ -901,7 +895,6 @@ mod dotaddressable {
"composing" => Err(MeliError::new("unimplemented")),
"pgp" => Err(MeliError::new("unimplemented")),
"terminal" => self.terminal.lookup(field, tail),
"plugins" => Err(MeliError::new("unimplemented")),
"log" => self.log.lookup(field, tail),
other => Err(MeliError::new(format!(

8
src/state.rs

@ -29,7 +29,7 @@ Input is received in the main loop from threads which listen on the stdin for us
*/
use super::*;
use crate::plugins::PluginManager;
//use crate::plugins::PluginManager;
use melib::backends::{AccountHash, BackendEventConsumer};
use crate::jobs::JobExecutor;
@ -115,7 +115,6 @@ pub struct Context {
input_thread: InputHandler,
pub job_executor: Arc<JobExecutor>,
pub children: Vec<std::process::Child>,
pub plugin_manager: PluginManager,
pub temp_files: Vec<File>,
}
@ -243,9 +242,9 @@ impl State {
} else {
Settings::new()?
};
/*
let mut plugin_manager = PluginManager::new();
for (_, p) in settings.plugins.clone() {
/*
if crate::plugins::PluginKind::Backend == p.kind() {
debug!("registering {:?}", &p);
crate::plugins::backend::PluginBackend::register(
@ -254,9 +253,9 @@ impl State {
&mut backends,
);
}
*/
plugin_manager.register(p)?;
}
*/
let termsize = termion::terminal_size()?;
let cols = termsize.0 as usize;
@ -350,7 +349,6 @@ impl State {
temp_files: Vec::new(),
job_executor,
children: vec![],
plugin_manager,
input_thread: InputHandler {
pipe: input_thread_pipe,

Loading…
Cancel
Save