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 {
|
impl Ui {
|
||||||
pub fn run(opt: &Opt) {
|
pub fn run(opt: &Opt) {
|
||||||
let repo_id = match &opt.repo {
|
let repo_id = opt.repo.as_ref().map(|repo| String::as_str(repo));
|
||||||
None => None,
|
|
||||||
Some(repo) => Some(String::as_str(repo)),
|
|
||||||
};
|
|
||||||
|
|
||||||
let mut ui = Ui {
|
let mut ui = Ui {
|
||||||
state: State::SelectService,
|
state: State::SelectService,
|
||||||
|
@ -49,10 +49,7 @@ pub struct NoYaml {
|
|||||||
|
|
||||||
impl NoYaml {
|
impl NoYaml {
|
||||||
pub fn run(opt: &Opt) {
|
pub fn run(opt: &Opt) {
|
||||||
let repo_id = match &opt.repo {
|
let repo_id = opt.repo.as_ref().map(|repo| String::as_str(repo));
|
||||||
None => None,
|
|
||||||
Some(repo) => Some(String::as_str(repo)),
|
|
||||||
};
|
|
||||||
|
|
||||||
let mut ui = NoYaml {
|
let mut ui = NoYaml {
|
||||||
state: State::EditRepo,
|
state: State::EditRepo,
|
||||||
|
@ -64,11 +64,10 @@ impl RepoEntry {
|
|||||||
Key::Backspace => {
|
Key::Backspace => {
|
||||||
if self.default_text {
|
if self.default_text {
|
||||||
self.text = String::new();
|
self.text = String::new();
|
||||||
self.changed = true;
|
|
||||||
} else {
|
} else {
|
||||||
self.text.pop();
|
self.text.pop();
|
||||||
self.changed = true;
|
|
||||||
}
|
}
|
||||||
|
self.changed = true;
|
||||||
}
|
}
|
||||||
Key::Esc => {
|
Key::Esc => {
|
||||||
self.text = self.old_text.clone();
|
self.text = self.old_text.clone();
|
||||||
|
Loading…
Reference in New Issue
Block a user