Skip to content

Commit e2318a1

Browse files
committed
Apply format with cargo fmt --all
1 parent dc6e8fb commit e2318a1

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/diff.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
use crate::params::{parse_params, Format};
77
use crate::utils::report_failure_to_read_input_file;
8-
use crate::{context_diff, ed_diff, normal_diff, unified_diff, side_diff};
8+
use crate::{context_diff, ed_diff, normal_diff, side_diff, unified_diff};
99
use std::env::ArgsOs;
1010
use std::ffi::OsString;
1111
use std::fs;
@@ -79,7 +79,7 @@ pub fn main(opts: Peekable<ArgsOs>) -> ExitCode {
7979
eprintln!("{error}");
8080
exit(2);
8181
}),
82-
Format::SideBySide => side_diff::diff(&from_content, &to_content)
82+
Format::SideBySide => side_diff::diff(&from_content, &to_content),
8383
};
8484
if params.brief && !result.is_empty() {
8585
println!(

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ pub mod ed_diff;
44
pub mod macros;
55
pub mod normal_diff;
66
pub mod params;
7+
pub mod side_diff;
78
pub mod unified_diff;
89
pub mod utils;
9-
pub mod side_diff;
1010

1111
// Re-export the public functions/types you need
1212
pub use context_diff::diff as context_diff;
1313
pub use ed_diff::diff as ed_diff;
1414
pub use normal_diff::diff as normal_diff;
15+
pub use side_diff::diff as side_by_syde_diff;
1516
pub use unified_diff::diff as unified_diff;
16-
pub use side_diff::diff as side_by_syde_diff;

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ mod ed_diff;
1818
mod macros;
1919
mod normal_diff;
2020
mod params;
21-
mod unified_diff;
2221
mod side_diff;
22+
mod unified_diff;
2323
mod utils;
2424

2525
/// # Panics

src/params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub enum Format {
1111
Unified,
1212
Context,
1313
Ed,
14-
SideBySide
14+
SideBySide,
1515
}
1616

1717
#[derive(Clone, Debug, Eq, PartialEq)]

src/side_diff.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ fn push_output(
2929
output.write_all(symbol)?; // {symbol}
3030
output.write_all(b" ")?; // {space_char}
3131
output.write_all(right_ln)?; // {right_line}
32-
32+
3333
writeln!(output)?; // {EOL}
3434

3535
Ok(())
3636
}
3737

3838
pub fn diff(from_file: &[u8], to_file: &[u8]) -> Vec<u8> {
3939
// ^ The left file ^ The right file
40-
40+
4141
let mut output = stdout().lock();
4242
let left_lines: Vec<&[u8]> = from_file.split(|&c| c == b'\n').collect();
4343
let right_lines: Vec<&[u8]> = to_file.split(|&c| c == b'\n').collect();

src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ mod tests {
249249

250250
#[test]
251251
fn utf8_multibyte_cut_invalidates() {
252-
let orig = "áéíóú".as_bytes();
252+
let orig = "áéíóú".as_bytes();
253253
let result = limited_string(&orig, 1);
254254
// should contain only the first byte of mult-byte char
255255
assert_eq!(result, vec![0xC3]);

0 commit comments

Comments
 (0)