fix: run cargo fmt

This commit is contained in:
Richard Custodio 2024-03-18 18:24:57 -03:00
parent db7d8680ce
commit 8ed62541af
No known key found for this signature in database
GPG key ID: 95F51F46E2C6E8D7
5 changed files with 11 additions and 25 deletions

View file

@ -78,9 +78,7 @@ impl Program for Controls {
container(
column![
text("Background color").color(Color::WHITE),
text!("{background_color:?}")
.size(14)
.color(Color::WHITE),
text!("{background_color:?}").size(14).color(Color::WHITE),
text_input("Placeholder", &self.input)
.on_input(Message::InputChanged),
sliders,

View file

@ -284,10 +284,8 @@ fn view_content<'a>(
.spacing(5)
.max_width(160);
let content = column![
text!("{}x{}", size.width, size.height).size(24),
controls,
]
let content =
column![text!("{}x{}", size.width, size.height).size(24), controls,]
.spacing(10)
.align_items(Alignment::Center);

View file

@ -109,9 +109,7 @@ impl Pokemon {
column![
row![
text(&self.name).size(30).width(Length::Fill),
text!("#{}", self.number)
.size(20)
.color([0.5, 0.5, 0.5]),
text!("#{}", self.number).size(20).color([0.5, 0.5, 0.5]),
]
.align_items(Alignment::Center)
.spacing(20),

View file

@ -108,15 +108,11 @@ impl Example {
let memory_used = text!("Memory (used): {memory_text}");
let graphics_adapter = text!(
"Graphics adapter: {}",
information.graphics_adapter
);
let graphics_adapter =
text!("Graphics adapter: {}", information.graphics_adapter);
let graphics_backend = text!(
"Graphics backend: {}",
information.graphics_backend
);
let graphics_backend =
text!("Graphics backend: {}", information.graphics_backend);
column![
system_name.size(30),

View file

@ -52,11 +52,7 @@ impl VectorialText {
fn view(&self) -> Element<Message> {
let slider_with_label = |label, range, value, message: fn(f32) -> _| {
column![
row![
text(label),
horizontal_space(),
text!("{:.2}", value)
],
row![text(label), horizontal_space(), text!("{:.2}", value)],
slider(range, value, message).step(0.01)
]
.spacing(2)