chore: clear warnings
This commit is contained in:
parent
0b098b25ba
commit
1323736724
@ -1,5 +1,5 @@
|
|||||||
pub mod interactive {
|
pub mod interactive {
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::Path;
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
|
|
||||||
|
@ -5,8 +5,7 @@ use clap::Parser;
|
|||||||
use tracing_subscriber::EnvFilter;
|
use tracing_subscriber::EnvFilter;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
commands::interactive::InteractiveCommand, ssh_command::SshCommandState,
|
commands::interactive::InteractiveCommand, ssh_command::SshCommandState, state::State,
|
||||||
ssh_config::SshConfigServiceState, state::State, user_fuzzy_find::UserFuzzyFindState,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mod commands;
|
mod commands;
|
||||||
@ -83,7 +82,5 @@ async fn main() -> anyhow::Result<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok(());
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use std::process::Stdio;
|
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
|
|
||||||
use crate::{ssh_config::SshItem, state::State};
|
use crate::{ssh_config::SshItem, state::State};
|
||||||
|
@ -70,7 +70,7 @@ impl SshItems {
|
|||||||
self.items.values().collect()
|
self.items.values().collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn from_choice(&self, choice: &str) -> Option<&SshItem> {
|
pub fn get_choice(&self, choice: &str) -> Option<&SshItem> {
|
||||||
self.items.get(choice)
|
self.items.get(choice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#[derive(Clone)]
|
#[derive(Clone, Default)]
|
||||||
pub struct State {}
|
pub struct State {}
|
||||||
|
|
||||||
impl State {
|
impl State {
|
||||||
|
@ -36,7 +36,7 @@ impl UserFuzzyFind {
|
|||||||
let output = chosen_item.output();
|
let output = chosen_item.output();
|
||||||
|
|
||||||
let chosen_ssh_item = items
|
let chosen_ssh_item = items
|
||||||
.from_choice(&output) // Cow, str, String
|
.get_choice(&output) // Cow, str, String
|
||||||
.expect("always find an ssh item from a choice");
|
.expect("always find an ssh item from a choice");
|
||||||
tracing::debug!("the user chose item: {chosen_ssh_item:#?}");
|
tracing::debug!("the user chose item: {chosen_ssh_item:#?}");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user