Update dependencies
This commit is contained in:
1138
Cargo.lock
generated
1138
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,7 @@ sqlite-bundled = ["libsqlite3-sys/bundled"]
|
||||
[dependencies]
|
||||
sn0int-common = { version="0.13.0", path="sn0int-common" }
|
||||
sn0int-std = { version="=0.24.2", path="sn0int-std" }
|
||||
rustyline = "9.0"
|
||||
rustyline = "10.0"
|
||||
log = "0.4"
|
||||
env_logger = "0.9"
|
||||
hlua-badtouch = "0.4"
|
||||
@@ -93,7 +93,7 @@ os-version = "0.2"
|
||||
caps = "0.5"
|
||||
#syscallz = { path="../syscallz-rs" }
|
||||
syscallz = "0.16"
|
||||
nix = "0.23"
|
||||
nix = "0.24"
|
||||
|
||||
[target.'cfg(target_os="openbsd")'.dependencies]
|
||||
pledge = "0.4"
|
||||
@@ -101,5 +101,5 @@ unveil = "0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
#boxxy = { path = "../boxxy-rs" }
|
||||
boxxy = "0.12"
|
||||
boxxy = "0.13"
|
||||
tempfile = "3.0"
|
||||
|
||||
@@ -31,12 +31,12 @@ pem = "1"
|
||||
url = "2.0"
|
||||
tungstenite = { version = "0.13", default-features = false }
|
||||
kuchiki = "0.8.0"
|
||||
maxminddb = "0.22"
|
||||
maxminddb = "0.23"
|
||||
x509-parser = "0.13"
|
||||
der-parser = "7"
|
||||
der-parser = "8"
|
||||
publicsuffix = { version="2", default-features=false }
|
||||
xml-rs = "0.8"
|
||||
geo = "0.19"
|
||||
geo = "0.20"
|
||||
bytes = "0.4"
|
||||
base64 = "0.13"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
|
||||
@@ -24,13 +24,13 @@ pub struct Repl<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Repl<'a> {
|
||||
pub fn new(lua: Lua<'a>, state: Arc<LuaState>) -> Repl<'a> {
|
||||
let rl = Readline::with(ReplCompleter::default());
|
||||
Repl {
|
||||
pub fn new(lua: Lua<'a>, state: Arc<LuaState>) -> Result<Repl<'a>> {
|
||||
let rl = Readline::with(ReplCompleter::default())?;
|
||||
Ok(Repl {
|
||||
rl,
|
||||
lua,
|
||||
state,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn update_globals(&mut self) {
|
||||
@@ -104,7 +104,7 @@ pub fn run(config: &Config) -> Result<()> {
|
||||
|
||||
let tx = DummyIpcChild::create();
|
||||
let (lua, state) = ctx::ctx(env, tx);
|
||||
let mut repl = Repl::new(lua, state);
|
||||
let mut repl = Repl::new(lua, state)?;
|
||||
|
||||
println!(r#":: sn0int v{} lua repl
|
||||
Assign variables with `a = sn0int_version()` and `return a` to print
|
||||
|
||||
@@ -174,9 +174,9 @@ pub struct Shell<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Shell<'a> {
|
||||
pub fn new(config: &'a Config, db: Database, blobs: BlobStorage, psl: PslReader, library: Library<'a>, keyring: KeyRing) -> Shell<'a> {
|
||||
pub fn new(config: &'a Config, db: Database, blobs: BlobStorage, psl: PslReader, library: Library<'a>, keyring: KeyRing) -> Result<Shell<'a>> {
|
||||
let h = CmdCompleter::default();
|
||||
let rl = Readline::with(h);
|
||||
let rl = Readline::with(h)?;
|
||||
|
||||
let prompt = Prompt::new(db.name().to_string());
|
||||
|
||||
@@ -197,7 +197,7 @@ impl<'a> Shell<'a> {
|
||||
rl.reload_module_cache();
|
||||
rl.reload_keyring_cache();
|
||||
|
||||
rl
|
||||
Ok(rl)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
@@ -571,7 +571,7 @@ pub fn init<'a>(args: &Args, config: &'a Config, verbose_init: bool) -> Result<S
|
||||
}
|
||||
autoupdate.check_background(config, library.list());
|
||||
|
||||
let mut rl = Shell::new(config, db, blobs, psl, library, keyring);
|
||||
let mut rl = Shell::new(config, db, blobs, psl, library, keyring)?;
|
||||
|
||||
ttl::reap_expired(&mut rl)?;
|
||||
|
||||
|
||||
@@ -10,35 +10,29 @@ pub struct Readline<T: rustyline::Helper> {
|
||||
|
||||
impl Readline<()> {
|
||||
#[inline]
|
||||
pub fn new() -> Readline<()> {
|
||||
pub fn new() -> Result<Readline<()>> {
|
||||
Readline::init(None)
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Readline<()> {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: rustyline::Helper> Readline<T> {
|
||||
#[inline]
|
||||
pub fn with(helper: T) -> Readline<T> {
|
||||
pub fn with(helper: T) -> Result<Readline<T>> {
|
||||
Readline::init(Some(helper))
|
||||
}
|
||||
|
||||
fn init(helper: Option<T>) -> Readline<T> {
|
||||
fn init(helper: Option<T>) -> Result<Readline<T>> {
|
||||
let rl_config = rustyline::Config::builder()
|
||||
.completion_type(CompletionType::List)
|
||||
.edit_mode(EditMode::Emacs)
|
||||
.build();
|
||||
|
||||
let mut rl: Editor<T> = Editor::with_config(rl_config);
|
||||
let mut rl: Editor<T> = Editor::with_config(rl_config)?;
|
||||
rl.set_helper(helper);
|
||||
|
||||
Readline {
|
||||
Ok(Readline {
|
||||
rl,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
@@ -15,7 +15,7 @@ pub fn random_string(len: usize) -> String {
|
||||
}
|
||||
|
||||
pub fn read_line(prompt: &str) -> Result<String> {
|
||||
let mut rl = rustyline::Editor::<()>::new();
|
||||
let mut rl = rustyline::Editor::<()>::new()?;
|
||||
let mut line = rl.readline(prompt)
|
||||
.map_err(|err| match err {
|
||||
ReadlineError::Eof => format_err!("Failed to read line from input"),
|
||||
|
||||
Reference in New Issue
Block a user