@@ -54,9 +54,9 @@ pub fn write(
5454/// use std::io::BufReader;
5555///
5656/// let stdin = io::stdin();
57- /// code_minimap::printstd (stdin.lock(), 1.0, 1.0, None).unwrap();
57+ /// code_minimap::print (stdin.lock(), 1.0, 1.0, None).unwrap();
5858/// ```
59- pub fn printstd ( reader : impl BufRead , hscale : f64 , vscale : f64 , padding : Option < usize > ) -> io:: Result < ( ) > {
59+ pub fn print ( reader : impl BufRead , hscale : f64 , vscale : f64 , padding : Option < usize > ) -> io:: Result < ( ) > {
6060 write ( io:: stdout ( ) , reader, hscale, vscale, padding)
6161}
6262
@@ -80,7 +80,7 @@ pub fn write_to_string(reader: impl BufRead, hscale: f64, vscale: f64, padding:
8080 Ok ( String :: from_utf8 ( buf) . unwrap ( ) )
8181}
8282
83- fn write_frame ( mut output : impl Write , frame : & [ Range < usize > ] , padding : Option < usize > ) -> std:: io:: Result < ( ) > {
83+ fn write_frame ( mut writer : impl Write , frame : & [ Range < usize > ] , padding : Option < usize > ) -> std:: io:: Result < ( ) > {
8484 let idx = |pos| {
8585 frame
8686 . iter ( )
@@ -93,8 +93,8 @@ fn write_frame(mut output: impl Write, frame: &[Range<usize>], padding: Option<u
9393 . map ( |i| BRAILLE_MATRIX [ ( idx ( i) ) + ( idx ( i + 1 ) << 4 ) ] )
9494 . collect ( ) ;
9595 match padding {
96- Some ( padding) => writeln ! ( output , "{0:<1$}" , line, padding) ,
97- None => writeln ! ( output , "{}" , line) ,
96+ Some ( padding) => writeln ! ( writer , "{0:<1$}" , line, padding) ,
97+ None => writeln ! ( writer , "{}" , line) ,
9898 }
9999}
100100
0 commit comments