Skip to content

Commit 591f540

Browse files
author
Deren Vural
committed
trunk formatting
Signed-off-by: Deren Vural <derenv@live.co.uk>
1 parent 8bfa0fa commit 591f540

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

src/gpu_page/mod.rs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ mod imp;
2222
use imp::ModificationWindowContainer;
2323

2424
// Imports
25-
use adwaita::{gio, glib, ViewStack, Application};
25+
use adwaita::{gio, glib, Application, ViewStack};
2626
use gio::Settings;
2727
use glib::{clone, translate::FromGlib, Object, SourceId};
2828
use gtk::{prelude::*, subclass::prelude::*, Align, Button, Grid, Label, LayoutChild, Orientation};
29-
use std::{sync::Arc, sync::Mutex, cell::RefMut, sync::MutexGuard};
29+
use std::{cell::RefMut, sync::Arc, sync::Mutex, sync::MutexGuard};
3030

3131
// Modules
32-
use crate::{provider::Provider, modificationwindow::ModificationWindow, APP_ID};
32+
use crate::{modificationwindow::ModificationWindow, provider::Provider, APP_ID};
3333

3434
// GObject wrapper for GpuPage
3535
glib::wrapper! {
@@ -382,14 +382,19 @@ impl GpuPage {
382382
content_grid.attach(&new_grid, 0, 0 as i32, 100, 12);
383383

384384
// Populate view given list of properties
385-
let output: (Grid, Vec<Label>) = self.create_properties(new_grid, properties, labels);
385+
let output: (Grid, Vec<Label>) =
386+
self.create_properties(new_grid, properties, labels);
386387
let new_view_grid: Grid = output.0;
387388
labels = output.1;
388389

389390
// Save built view
390391
// Add object
391392
let new_stack_item_name: String = index.to_string() + "_stack_item";
392-
new_stack.add_titled(&new_view_grid, Some(&new_stack_item_name), &loaded_views[index]);
393+
new_stack.add_titled(
394+
&new_view_grid,
395+
Some(&new_stack_item_name),
396+
&loaded_views[index],
397+
);
393398
// println!("NEW STACK ITEM: `{}`", new_stack_item_name);//TEST
394399
// Add icon
395400
//NOTE: see https://world.pages.gitlab.gnome.org/Rust/libadwaita-rs/stable/latest/docs/libadwaita/struct.ViewStack.html
@@ -506,7 +511,12 @@ impl GpuPage {
506511
* Notes:
507512
*
508513
*/
509-
fn create_properties(&self, grid: Grid, properties: Vec<String>, mut labels: Vec<Label>) -> (Grid, Vec<Label>) {
514+
fn create_properties(
515+
&self,
516+
grid: Grid,
517+
properties: Vec<String>,
518+
mut labels: Vec<Label>,
519+
) -> (Grid, Vec<Label>) {
510520
// Load properties from struct
511521
let properties_store: Arc<Mutex<Vec<String>>> = Arc::new(Mutex::new(properties));
512522

@@ -700,7 +710,6 @@ impl GpuPage {
700710
// Load refresh time (s) from settings
701711
let refresh_rate: u32 = settings_obj.get::<i32>("refreshrate") as u32;
702712

703-
704713
// Create thread safe container for properties
705714
let properties_store: Arc<Mutex<Vec<String>>> = Arc::new(Mutex::new(properties));
706715

0 commit comments

Comments
 (0)