Skip to content

Commit

Permalink
Update rustyline to v0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Mar 4, 2023
1 parent b40092d commit e6b3b44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ proptest = "1"
rand = "0.8"
regex = "1"
# MSRV
rustyline = "10.1.1"
rustyline = "11"
scrypt = "0.10"
serde_json = "1"

Expand Down
5 changes: 3 additions & 2 deletions examples/digital_locker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ use opaque_ke::{
ServerLoginStartParameters, ServerRegistration, ServerRegistrationLen, ServerSetup,
};
use rustyline::error::ReadlineError;
use rustyline::history::DefaultHistory;
use rustyline::Editor;

// The ciphersuite trait allows to specify the underlying primitives that will
Expand Down Expand Up @@ -216,7 +217,7 @@ fn main() {
let mut rng = OsRng;
let server_setup = ServerSetup::<DefaultCipherSuite>::new(&mut rng);

let mut rl = Editor::<()>::new().unwrap();
let mut rl = Editor::<(), _>::new().unwrap();
let mut registered_lockers: Vec<Locker> = vec![];
loop {
display_lockers(&registered_lockers);
Expand Down Expand Up @@ -323,7 +324,7 @@ fn handle_error(err: ReadlineError) {
fn get_two_strings(
s1: &str,
s2: &str,
rl: &mut Editor<()>,
rl: &mut Editor<(), DefaultHistory>,
string1: Option<String>,
) -> (String, String) {
let query = if string1.is_none() { s1 } else { s2 };
Expand Down
5 changes: 3 additions & 2 deletions examples/simple_login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ use opaque_ke::{
ServerLoginStartParameters, ServerRegistration, ServerRegistrationLen, ServerSetup,
};
use rustyline::error::ReadlineError;
use rustyline::history::DefaultHistory;
use rustyline::Editor;

// The ciphersuite trait allows to specify the underlying primitives that will
Expand Down Expand Up @@ -160,7 +161,7 @@ fn main() {
let mut rng = OsRng;
let server_setup = ServerSetup::<DefaultCipherSuite>::new(&mut rng);

let mut rl = Editor::<()>::new().unwrap();
let mut rl = Editor::<(), _>::new().unwrap();
let mut registered_users =
HashMap::<String, GenericArray<u8, ServerRegistrationLen<DefaultCipherSuite>>>::new();
loop {
Expand Down Expand Up @@ -237,7 +238,7 @@ fn handle_error(err: ReadlineError) {
fn get_two_strings(
s1: &str,
s2: &str,
rl: &mut Editor<()>,
rl: &mut Editor<(), DefaultHistory>,
string1: Option<String>,
) -> (String, String) {
let query = if string1.is_none() { s1 } else { s2 };
Expand Down

0 comments on commit e6b3b44

Please sign in to comment.