fixed clippy warnings
All checks were successful
continuous-integration/woodpecker the build was successful
All checks were successful
continuous-integration/woodpecker the build was successful
This commit is contained in:
parent
3bf2359392
commit
6c83683a4a
@ -54,10 +54,7 @@ impl std::iter::Iterator for State {
|
||||
|
||||
impl Ui {
|
||||
pub fn run(opt: &Opt) {
|
||||
let repo_id = match &opt.repo {
|
||||
None => None,
|
||||
Some(repo) => Some(String::as_str(repo)),
|
||||
};
|
||||
let repo_id = opt.repo.as_ref().map(|repo| String::as_str(repo));
|
||||
|
||||
let mut ui = Ui {
|
||||
state: State::SelectService,
|
||||
|
@ -49,10 +49,7 @@ pub struct NoYaml {
|
||||
|
||||
impl NoYaml {
|
||||
pub fn run(opt: &Opt) {
|
||||
let repo_id = match &opt.repo {
|
||||
None => None,
|
||||
Some(repo) => Some(String::as_str(repo)),
|
||||
};
|
||||
let repo_id = opt.repo.as_ref().map(|repo| String::as_str(repo));
|
||||
|
||||
let mut ui = NoYaml {
|
||||
state: State::EditRepo,
|
||||
|
@ -64,11 +64,10 @@ impl RepoEntry {
|
||||
Key::Backspace => {
|
||||
if self.default_text {
|
||||
self.text = String::new();
|
||||
self.changed = true;
|
||||
} else {
|
||||
self.text.pop();
|
||||
self.changed = true;
|
||||
}
|
||||
self.changed = true;
|
||||
}
|
||||
Key::Esc => {
|
||||
self.text = self.old_text.clone();
|
||||
|
Loading…
Reference in New Issue
Block a user