浏览代码

Remove trailing whitespace

Johannes Hofmann 8 年前
父节点
当前提交
f43628a3fb
共有 1 个文件被更改,包括 17 次插入17 次删除
  1. 17
    17
      src/reader.rs

+ 17
- 17
src/reader.rs 查看文件

17
 
17
 
18
 impl<R: Read> ElementReader<R> {
18
 impl<R: Read> ElementReader<R> {
19
     /// Creates a new `ElementReader`.
19
     /// Creates a new `ElementReader`.
20
-    /// 
20
+    ///
21
     /// # Example
21
     /// # Example
22
     /// ```
22
     /// ```
23
     /// use osmpbf::*;
23
     /// use osmpbf::*;
24
-    /// 
24
+    ///
25
     /// # fn foo() -> Result<()> {
25
     /// # fn foo() -> Result<()> {
26
     /// let f = std::fs::File::open("tests/test.osm.pbf")?;
26
     /// let f = std::fs::File::open("tests/test.osm.pbf")?;
27
     /// let buf_reader = std::io::BufReader::new(f);
27
     /// let buf_reader = std::io::BufReader::new(f);
28
-    /// 
28
+    ///
29
     /// let reader = ElementReader::new(buf_reader);
29
     /// let reader = ElementReader::new(buf_reader);
30
-    /// 
30
+    ///
31
     /// # Ok(())
31
     /// # Ok(())
32
     /// # }
32
     /// # }
33
     /// ```
33
     /// ```
39
 
39
 
40
     /// Decodes the PBF structure sequentially and calls the given closure on each element.
40
     /// Decodes the PBF structure sequentially and calls the given closure on each element.
41
     /// Consider using `par_map_reduce` instead if you need better performance.
41
     /// Consider using `par_map_reduce` instead if you need better performance.
42
-    /// 
42
+    ///
43
     /// # Errors
43
     /// # Errors
44
     /// Returns the first Error encountered while parsing the PBF structure.
44
     /// Returns the first Error encountered while parsing the PBF structure.
45
-    /// 
45
+    ///
46
     /// # Example
46
     /// # Example
47
     /// ```
47
     /// ```
48
     /// use osmpbf::*;
48
     /// use osmpbf::*;
49
-    /// 
49
+    ///
50
     /// # fn foo() -> Result<()> {
50
     /// # fn foo() -> Result<()> {
51
     /// let reader = ElementReader::from_path("tests/test.osm.pbf")?;
51
     /// let reader = ElementReader::from_path("tests/test.osm.pbf")?;
52
     /// let mut ways = 0_u64;
52
     /// let mut ways = 0_u64;
57
     ///         ways += 1;
57
     ///         ways += 1;
58
     ///     }
58
     ///     }
59
     /// })?;
59
     /// })?;
60
-    /// 
60
+    ///
61
     /// println!("Number of ways: {}", ways);
61
     /// println!("Number of ways: {}", ways);
62
-    /// 
62
+    ///
63
     /// # Ok(())
63
     /// # Ok(())
64
     /// # }
64
     /// # }
65
     /// ```
65
     /// ```
101
     /// `identity` closure should produce an identity value that is inserted into `reduce_op` when
101
     /// `identity` closure should produce an identity value that is inserted into `reduce_op` when
102
     /// necessary. The number of times that this identity value is inserted should not alter the
102
     /// necessary. The number of times that this identity value is inserted should not alter the
103
     /// result.
103
     /// result.
104
-    /// 
104
+    ///
105
     /// # Errors
105
     /// # Errors
106
     /// Returns the first Error encountered while parsing the PBF structure.
106
     /// Returns the first Error encountered while parsing the PBF structure.
107
-    /// 
107
+    ///
108
     /// # Example
108
     /// # Example
109
     /// ```
109
     /// ```
110
     /// use osmpbf::*;
110
     /// use osmpbf::*;
111
-    /// 
111
+    ///
112
     /// # fn foo() -> Result<()> {
112
     /// # fn foo() -> Result<()> {
113
     /// let reader = ElementReader::from_path("tests/test.osm.pbf")?;
113
     /// let reader = ElementReader::from_path("tests/test.osm.pbf")?;
114
     ///
114
     ///
123
     ///     || 0_u64,      // Zero is the identity value for addition
123
     ///     || 0_u64,      // Zero is the identity value for addition
124
     ///     |a, b| a + b   // Sum the partial results
124
     ///     |a, b| a + b   // Sum the partial results
125
     /// )?;
125
     /// )?;
126
-    /// 
126
+    ///
127
     /// println!("Number of ways: {}", ways);
127
     /// println!("Number of ways: {}", ways);
128
     /// # Ok(())
128
     /// # Ok(())
129
     /// # }
129
     /// # }
154
                     let rels = block.groups()
154
                     let rels = block.groups()
155
                          .flat_map(|g| g.relations())
155
                          .flat_map(|g| g.relations())
156
                          .map(|r| map_op(Element::Relation(r)));
156
                          .map(|r| map_op(Element::Relation(r)));
157
-                
157
+
158
                     Ok(dnodes.chain(nodes)
158
                     Ok(dnodes.chain(nodes)
159
                         .chain(ways)
159
                         .chain(ways)
160
                         .chain(rels)
160
                         .chain(rels)
173
 
173
 
174
 impl ElementReader<BufReader<File>> {
174
 impl ElementReader<BufReader<File>> {
175
     /// Tries to open the file at the given path and constructs an `ElementReader` from this.
175
     /// Tries to open the file at the given path and constructs an `ElementReader` from this.
176
-    /// 
176
+    ///
177
     /// # Errors
177
     /// # Errors
178
     /// Returns the same errors that `std::fs::File::open` returns.
178
     /// Returns the same errors that `std::fs::File::open` returns.
179
-    /// 
179
+    ///
180
     /// # Example
180
     /// # Example
181
     /// ```
181
     /// ```
182
     /// use osmpbf::*;
182
     /// use osmpbf::*;
183
-    /// 
183
+    ///
184
     /// # fn foo() -> Result<()> {
184
     /// # fn foo() -> Result<()> {
185
     /// let reader = ElementReader::from_path("tests/test.osm.pbf")?;
185
     /// let reader = ElementReader::from_path("tests/test.osm.pbf")?;
186
     /// # Ok(())
186
     /// # Ok(())