1
+ use std:: {
2
+ io:: { self , BufRead , Write } ,
3
+ ops:: Range ,
4
+ } ;
5
+
1
6
use itertools:: Itertools ;
2
- use std:: io:: { self , BufRead , Write } ;
3
- use std:: ops:: Range ;
4
7
5
8
/// Write minimap to the writer.
6
9
pub fn write (
@@ -50,8 +53,7 @@ pub fn write(
50
53
/// Basic usage:
51
54
///
52
55
/// ```
53
- /// use std::io;
54
- /// use std::io::BufReader;
56
+ /// use std::{io, io::BufReader};
55
57
///
56
58
/// let stdin = io::stdin();
57
59
/// code_minimap::print(stdin.lock(), 1.0, 1.0, None).unwrap();
@@ -67,11 +69,11 @@ pub fn print(reader: impl BufRead, hscale: f64, vscale: f64, padding: Option<usi
67
69
/// Basic usage:
68
70
///
69
71
/// ```
70
- /// use std::io;
71
- /// use std::io::BufReader;
72
+ /// use std::{io, io::BufReader};
72
73
///
73
74
/// let stdin = io::stdin();
74
- /// let s = code_minimap::write_to_string(stdin.lock(), 1.0, 1.0, None).unwrap();
75
+ /// let s =
76
+ /// code_minimap::write_to_string(stdin.lock(), 1.0, 1.0, None).unwrap();
75
77
/// print!("{}", s);
76
78
/// ```
77
79
pub fn write_to_string ( reader : impl BufRead , hscale : f64 , vscale : f64 , padding : Option < usize > ) -> io:: Result < String > {
@@ -130,9 +132,10 @@ const BRAILLE_MATRIX : [char; 256] = [
130
132
131
133
#[ cfg( test) ]
132
134
mod test {
133
- use super :: * ;
134
135
use rstest:: * ;
135
136
137
+ use super :: * ;
138
+
136
139
#[ rstest(
137
140
input,
138
141
expected,
0 commit comments