Skip to content

Commit

Permalink
Add: Clippy Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zephira58 committed Mar 25, 2023
1 parent c8428af commit 5aba661
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl eframe::App for MyApp {

ui.add_space(10.0);

self.message = self.message.replace("\n", "");
self.message = self.message.replace('\n', "");

//UI elements for application introduction
ui.label("Hello and welcome to webhook sender!");
Expand Down
4 changes: 1 addition & 3 deletions src/app/api_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ pub fn get_affirmation() -> String {
.expect("Get failed")
.text()
.expect("Couldn't get response body")
.replace('{', "")
.replace('}', "")
.replace(':', "")
.replace(['{', '}', ':'], "")
.replace("affirmation", "")
.replace('"', "");
println!("Affirmation fetched!");
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ fn main() {
eframe::run_native(
APP_NAME, //app name
options, //just leave this at options
Box::new(|_cc| Box::new(MyApp::default())), //leave this as default
Box::new(|_cc| Box::<MyApp>::default()), //leave this as default
);
}

0 comments on commit 5aba661

Please sign in to comment.