Skip to content
This repository was archived by the owner on Apr 16, 2023. It is now read-only.

Commit 9d6b4f3

Browse files
committed
* Cleanup
* Removed printing of differences to stdout
1 parent 3e37457 commit 9d6b4f3

File tree

3 files changed

+17
-20
lines changed

3 files changed

+17
-20
lines changed

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use iced::{Sandbox, Settings};
44
mod view;
55
mod style;
66
mod filereader;
7+
78
pub fn main() -> iced::Result {
89
view::ApplicationContext::run(Settings {
910
id: Some(String::from("text-diff")),

src/style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ mod dark {
383383
a: 0.8,
384384
..if is_checked { ACTIVE } else { SURFACE }
385385
}
386-
.into(),
386+
.into(),
387387
..self.active(is_checked)
388388
}
389389
}

src/view.rs

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ impl Sandbox for ApplicationContext {
127127
}
128128
}
129129

130-
for d in &diff {
131-
println!("{}", &d);
132-
}
133-
134130
self.differences = diff;
135131
}
136132
Message::ThemeChanged(d) => self.theme = d,
@@ -154,7 +150,7 @@ impl Sandbox for ApplicationContext {
154150
Some(self.theme),
155151
Message::ThemeChanged,
156152
)
157-
.style(self.theme),
153+
.style(self.theme),
158154
)
159155
},
160156
);
@@ -165,37 +161,37 @@ impl Sandbox for ApplicationContext {
165161
&self.first_file,
166162
Message::FirstFileInputChanged,
167163
)
168-
.padding(10)
169-
.size(20)
170-
.style(self.theme);
164+
.padding(10)
165+
.size(20)
166+
.style(self.theme);
171167

172168
let btn_select_first_file = Button::new(
173169
&mut self.btn_select_first_file,
174170
Text::new("...").horizontal_alignment(alignment::Horizontal::Center),
175171
)
176-
.padding(10)
177-
.min_width(60)
178-
.on_press(Message::SelectFirstFilePressed)
179-
.style(self.theme);
172+
.padding(10)
173+
.min_width(60)
174+
.on_press(Message::SelectFirstFilePressed)
175+
.style(self.theme);
180176

181177
let second_file_input = TextInput::new(
182178
&mut self.second_file_input,
183179
"/path/to/second/file.txt",
184180
&self.second_file,
185181
Message::SecondFileInputChanged,
186182
)
187-
.padding(10)
188-
.size(20)
189-
.style(self.theme);
183+
.padding(10)
184+
.size(20)
185+
.style(self.theme);
190186

191187
let btn_select_second_file = Button::new(
192188
&mut self.btn_select_second_file,
193189
Text::new("...").horizontal_alignment(alignment::Horizontal::Center),
194190
)
195-
.padding(10)
196-
.min_width(60)
197-
.on_press(Message::SelectSecondFilePressed)
198-
.style(self.theme);
191+
.padding(10)
192+
.min_width(60)
193+
.on_press(Message::SelectSecondFilePressed)
194+
.style(self.theme);
199195

200196
let btn_compare = Button::new(&mut self.btn_compare, Text::new("Compare"))
201197
.padding(10)

0 commit comments

Comments
 (0)