@@ -54,9 +54,9 @@ pub fn write(
54
54
/// use std::io::BufReader;
55
55
///
56
56
/// 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();
58
58
/// ```
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 < ( ) > {
60
60
write ( io:: stdout ( ) , reader, hscale, vscale, padding)
61
61
}
62
62
@@ -80,7 +80,7 @@ pub fn write_to_string(reader: impl BufRead, hscale: f64, vscale: f64, padding:
80
80
Ok ( String :: from_utf8 ( buf) . unwrap ( ) )
81
81
}
82
82
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 < ( ) > {
84
84
let idx = |pos| {
85
85
frame
86
86
. iter ( )
@@ -93,8 +93,8 @@ fn write_frame(mut output: impl Write, frame: &[Range<usize>], padding: Option<u
93
93
. map ( |i| BRAILLE_MATRIX [ ( idx ( i) ) + ( idx ( i + 1 ) << 4 ) ] )
94
94
. collect ( ) ;
95
95
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) ,
98
98
}
99
99
}
100
100
0 commit comments