mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
fixes for 'nom' out of date
This commit is contained in:
parent
e98877fc71
commit
bf6be2beed
989
Cargo.lock
generated
989
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,6 @@ resolver = "2"
|
|||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
cursive = { git = "https://gitlab.com/veilid/cursive.git" }
|
cursive = { git = "https://gitlab.com/veilid/cursive.git" }
|
||||||
cursive_core = { git = "https://gitlab.com/veilid/cursive.git" }
|
cursive_core = { git = "https://gitlab.com/veilid/cursive.git" }
|
||||||
nom = { git = "https://gitlab.com/emixa-d/ansi-parser.git" }
|
|
||||||
|
|
||||||
# For local development
|
# For local development
|
||||||
# keyvaluedb = { path = "../keyvaluedb/keyvaluedb" }
|
# keyvaluedb = { path = "../keyvaluedb/keyvaluedb" }
|
||||||
|
@ -38,7 +38,7 @@ cursive = { git = "https://gitlab.com/veilid/cursive.git", default-features = fa
|
|||||||
cursive_buffered_backend = { git = "https://gitlab.com/veilid/cursive-buffered-backend.git" }
|
cursive_buffered_backend = { git = "https://gitlab.com/veilid/cursive-buffered-backend.git" }
|
||||||
# cursive-multiplex = "0.6.0"
|
# cursive-multiplex = "0.6.0"
|
||||||
# cursive_tree_view = "0.6.0"
|
# cursive_tree_view = "0.6.0"
|
||||||
cursive_table_view = "0.14.0"
|
cursive_table_view = { path = "../../cursive_table_view" }
|
||||||
arboard = "3.3.0"
|
arboard = "3.3.0"
|
||||||
# cursive-tabs = "0.5.0"
|
# cursive-tabs = "0.5.0"
|
||||||
clap = { version = "4", features = ["derive"] }
|
clap = { version = "4", features = ["derive"] }
|
||||||
|
@ -63,7 +63,7 @@ pub type NodeEventsPanel = Panel<NamedView<ScrollView<NamedView<CachedTextView>>
|
|||||||
|
|
||||||
static START_TIME: AtomicU64 = AtomicU64::new(0);
|
static START_TIME: AtomicU64 = AtomicU64::new(0);
|
||||||
|
|
||||||
pub type CursiveUICallback = Box<dyn Fn(&mut Cursive) + Send>;
|
pub type CursiveUICallback = Box<dyn Fn(&mut Cursive) + Send + Sync>;
|
||||||
|
|
||||||
struct UIState {
|
struct UIState {
|
||||||
attachment_state: Dirty<String>,
|
attachment_state: Dirty<String>,
|
||||||
@ -388,7 +388,7 @@ impl CursiveUI {
|
|||||||
close_cb: Option<CursiveUICallback>,
|
close_cb: Option<CursiveUICallback>,
|
||||||
) {
|
) {
|
||||||
// Creates a dialog around some text with a single button
|
// Creates a dialog around some text with a single button
|
||||||
let close_cb = Rc::new(close_cb);
|
let close_cb = Arc::new(close_cb);
|
||||||
let close_cb2 = close_cb.clone();
|
let close_cb2 = close_cb.clone();
|
||||||
s.add_layer(
|
s.add_layer(
|
||||||
Dialog::around(TextView::new(contents).scrollable())
|
Dialog::around(TextView::new(contents).scrollable())
|
||||||
@ -631,13 +631,15 @@ impl CursiveUI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_submit_peers_table_view(s: &mut Cursive, _row: usize, index: usize) {
|
fn on_submit_peers_table_view(s: &mut Cursive, _row: Option<usize>, index: Option<usize>) {
|
||||||
let peers_table_view = CursiveUI::peers(s);
|
if let Some(index) = index {
|
||||||
let node_id = peers_table_view
|
let peers_table_view = CursiveUI::peers(s);
|
||||||
.borrow_item(index)
|
let node_id = peers_table_view
|
||||||
.map(|j| j["node_ids"][0].to_string());
|
.borrow_item(index)
|
||||||
if let Some(node_id) = node_id {
|
.map(|j| j["node_ids"][0].to_string());
|
||||||
Self::copy_to_clipboard(s, node_id);
|
if let Some(node_id) = node_id {
|
||||||
|
Self::copy_to_clipboard(s, node_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,11 +81,7 @@ fn append_hash<P: AsRef<Path>, Q: AsRef<Path>>(input_path: P, output_path: Q) {
|
|||||||
let output_path = output_path.as_ref();
|
let output_path = output_path.as_ref();
|
||||||
let lines = std::io::BufReader::new(std::fs::File::open(input_path).unwrap()).lines();
|
let lines = std::io::BufReader::new(std::fs::File::open(input_path).unwrap()).lines();
|
||||||
let h = calculate_hash(lines);
|
let h = calculate_hash(lines);
|
||||||
let mut out_file = OpenOptions::new()
|
let mut out_file = OpenOptions::new().append(true).open(output_path).unwrap();
|
||||||
.write(true)
|
|
||||||
.append(true)
|
|
||||||
.open(output_path)
|
|
||||||
.unwrap();
|
|
||||||
writeln!(out_file, "\n//BUILDHASH:{}", hex::encode(h)).unwrap();
|
writeln!(out_file, "\n//BUILDHASH:{}", hex::encode(h)).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user