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]
|
||||
cursive = { 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
|
||||
# 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-multiplex = "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"
|
||||
# cursive-tabs = "0.5.0"
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
|
@ -63,7 +63,7 @@ pub type NodeEventsPanel = Panel<NamedView<ScrollView<NamedView<CachedTextView>>
|
||||
|
||||
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 {
|
||||
attachment_state: Dirty<String>,
|
||||
@ -388,7 +388,7 @@ impl CursiveUI {
|
||||
close_cb: Option<CursiveUICallback>,
|
||||
) {
|
||||
// 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();
|
||||
s.add_layer(
|
||||
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) {
|
||||
let peers_table_view = CursiveUI::peers(s);
|
||||
let node_id = peers_table_view
|
||||
.borrow_item(index)
|
||||
.map(|j| j["node_ids"][0].to_string());
|
||||
if let Some(node_id) = node_id {
|
||||
Self::copy_to_clipboard(s, node_id);
|
||||
fn on_submit_peers_table_view(s: &mut Cursive, _row: Option<usize>, index: Option<usize>) {
|
||||
if let Some(index) = index {
|
||||
let peers_table_view = CursiveUI::peers(s);
|
||||
let node_id = peers_table_view
|
||||
.borrow_item(index)
|
||||
.map(|j| j["node_ids"][0].to_string());
|
||||
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 lines = std::io::BufReader::new(std::fs::File::open(input_path).unwrap()).lines();
|
||||
let h = calculate_hash(lines);
|
||||
let mut out_file = OpenOptions::new()
|
||||
.write(true)
|
||||
.append(true)
|
||||
.open(output_path)
|
||||
.unwrap();
|
||||
let mut out_file = OpenOptions::new().append(true).open(output_path).unwrap();
|
||||
writeln!(out_file, "\n//BUILDHASH:{}", hex::encode(h)).unwrap();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user