@@ -35,7 +35,7 @@ fn push_output(
3535 Ok ( ( ) )
3636}
3737
38- pub fn diff ( from_file : & Vec < u8 > , to_file : & Vec < u8 > ) -> Vec < u8 > {
38+ pub fn diff ( from_file : & [ u8 ] , to_file : & [ u8 ] ) -> Vec < u8 > {
3939 // ^ The left file ^ The right file
4040
4141 let mut output = stdout ( ) . lock ( ) ;
@@ -47,7 +47,7 @@ pub fn diff(from_file: &Vec<u8>, to_file: &Vec<u8>) -> Vec<u8> {
4747 Result :: Left ( left_ln) => {
4848 push_output (
4949 & mut output,
50- & limited_string ( left_ln, tab_size) ,
50+ limited_string ( left_ln, tab_size) ,
5151 & [ ] ,
5252 b"<" ,
5353 tab_size,
@@ -58,7 +58,7 @@ pub fn diff(from_file: &Vec<u8>, to_file: &Vec<u8>) -> Vec<u8> {
5858 push_output (
5959 & mut output,
6060 & [ ] ,
61- & limited_string ( right_ln, tab_size) ,
61+ limited_string ( right_ln, tab_size) ,
6262 b">" ,
6363 tab_size,
6464 )
@@ -67,8 +67,8 @@ pub fn diff(from_file: &Vec<u8>, to_file: &Vec<u8>) -> Vec<u8> {
6767 Result :: Both ( left_ln, right_ln) => {
6868 push_output (
6969 & mut output,
70- & limited_string ( left_ln, tab_size) ,
71- & limited_string ( right_ln, tab_size) ,
70+ limited_string ( left_ln, tab_size) ,
71+ limited_string ( right_ln, tab_size) ,
7272 b" " ,
7373 tab_size,
7474 )
0 commit comments