Some other formatting changes
Some checks failed
Continuous integration / Clippy (push) Failing after 42s
Continuous integration / build (push) Successful in 54s

This commit is contained in:
Gvidas Juknevičius 2024-10-11 02:43:36 +03:00
parent 7edb257e2f
commit e0201ccb50
Signed by: MCorange
GPG Key ID: 12B1346D720B7FBB
6 changed files with 7 additions and 16 deletions

View File

@ -19,15 +19,6 @@ jobs:
# - uses: actions-rust-lang/setup-rust-toolchain@v1
# - run: cargo test
#fmt:
# name: Rustfmt
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions-rust-lang/setup-rust-toolchain@v1
# - run: rustup component add rustfmt
# - run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest

View File

@ -42,8 +42,8 @@ impl ComponentContextMenu for ContextMenu {
if ui.button(RichText::new("Delete").color(Color32::RED)).clicked() {
let w = gui.windows.get_window::<windows::confirm::ConfirmW>(WindowIndex::Confirm);
w.set_message(
&"side_nav_playlist_manifest_delete",
&"This will delete the playlist from the manifest file. This is NOT reversible",
"side_nav_playlist_manifest_delete",
"This will delete the playlist from the manifest file. This is NOT reversible",
&[playlist_name.clone()]
);
gui.windows.open(WindowIndex::Confirm, true);

View File

@ -84,8 +84,8 @@ impl ComponentContextMenu for ContextMenu {
if ui.button(RichText::new("Delete").color(Color32::RED)).clicked() {
let w = gui.windows.get_window::<windows::confirm::ConfirmW>(WindowIndex::Confirm);
w.set_message(
&"song_list_song_manifest_delete",
&"This will delete the song from the manifest file. This is NOT reversible",
"song_list_song_manifest_delete",
"This will delete the song from the manifest file. This is NOT reversible",
&[data.playlist_name().clone(), data.song_name().clone()]
);
gui.windows.open(WindowIndex::Confirm, true);

View File

@ -53,7 +53,7 @@ impl Gui {
pub fn throw_error<S: ToString>(&mut self, text: S) {
let w = self.windows.get_window::<windows::error::GuiError>(WindowIndex::Error);
w.set_error_message(&text);
w.set_error_message(text);
self.windows.open(WindowIndex::Error, true);
}
}

View File

@ -41,7 +41,7 @@ impl Window for ConfirmW {
}
impl ConfirmW {
pub fn set_message<S: ToString>(&mut self, new_id: &S, text: &S, data: &[String]) {
pub fn set_message<S: ToString>(&mut self, new_id: S, text: S, data: &[String]) {
self.text = text.to_string();
self.id = new_id.to_string();
self.data = data.to_vec();

View File

@ -27,7 +27,7 @@ impl Window for GuiError {
}
impl GuiError {
pub fn set_error_message<S: ToString>(&mut self, text: &S) {
pub fn set_error_message<S: ToString>(&mut self, text: S) {
self.text = text.to_string();
}
}