Skip to content

Commit e0729fb

Browse files
committed
Use block comments for module doc comments
RustRover can currently wrap these correctly, in contrast with their line comment equivalents: https://youtrack.jetbrains.com/issue/RUST-17888/
1 parent 329f3b1 commit e0729fb

File tree

3 files changed

+29
-26
lines changed

3 files changed

+29
-26
lines changed

coretypes/src/measure.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
//! Simple zero-overhead unit of measure types
2-
//!
3-
//! A poor man's version of F#'s units of measure, in order to keep units
4-
//! correct by construction. I wrote these rather than use the popular `uom`
5-
//! crate because the latter obscures the actual storage unit and numeric
6-
//! type.
1+
/*!
2+
Simple zero-overhead unit of measure types
3+
4+
A poor man's version of F#'s units of measure, in order to keep units correct by
5+
construction. I wrote these rather than use the popular `uom` crate because the
6+
latter obscures the actual storage unit and numeric type.
7+
*/
78

89
use std::ops::{Add, AddAssign, Div};
910

coursepointer/src/course.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Abstract course elements
1+
/*!
2+
Abstract course elements
3+
*/
24

35
use coretypes::GeoPoint;
46
use coretypes::measure::Meters;
@@ -47,9 +49,7 @@ impl CourseSetBuilder {
4749
for course_builder in self.courses {
4850
courses.push(course_builder.build());
4951
}
50-
CourseSet {
51-
courses,
52-
}
52+
CourseSet { courses }
5353
}
5454
}
5555

coursepointer/src/gpx.rs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
//! GPX track/route and waypoint reader
2-
//!
3-
//! # Usage
4-
//!
5-
//! Provides an iterator that reads in sequence the trackpoints/routepoints,
6-
//! waypoints, and other relevant items from a GPX track file.
7-
//!
8-
//! This module treats GPX routes and tracks synonymously, except that tracks
9-
//! may also contain segments.
10-
//!
11-
//! To use module, instantiate a [`GpxReader`] by calling
12-
//! [`GpxReader::from_text`] or [`GpxReader::from_reader`]. Iterating over the
13-
//! [`GpxReader`] will produce a sequence of [`GpxItem`] describing the
14-
//! contents of the input.
1+
/*!
2+
GPX track/route and waypoint reader
3+
4+
# Usage
5+
6+
Provides an iterator that reads in sequence the trackpoints/routepoints,
7+
waypoints, and other relevant items from a GPX track file.
8+
9+
This module treats GPX routes and tracks synonymously, except that tracks may
10+
also contain segments.
11+
12+
To use module, instantiate a [`GpxReader`] by calling
13+
[`GpxReader::from_text`] or [`GpxReader::from_reader`]. Iterating over the
14+
[`GpxReader`] will produce a sequence of [`GpxItem`] describing the
15+
contents of the input.
16+
*/
1517

1618
use std::io::BufRead;
1719
use std::num::ParseFloatError;
@@ -20,8 +22,8 @@ use std::{mem, str};
2022
use coretypes::measure::{Degrees, Meters};
2123
use coretypes::{GeoPoint, TypeError};
2224
use quick_xml;
23-
use quick_xml::events::attributes::AttrError;
2425
use quick_xml::events::Event;
26+
use quick_xml::events::attributes::AttrError;
2527
use quick_xml::name::QName;
2628
use quick_xml::reader::Reader;
2729
use thiserror::Error;
@@ -352,7 +354,7 @@ where
352354
#[cfg(test)]
353355
mod tests {
354356
use coretypes::measure::{Degrees, Meters};
355-
use coretypes::{geo_points, GeoPoint};
357+
use coretypes::{GeoPoint, geo_points};
356358

357359
use super::{GpxError, GpxItem, GpxReader, Result, Waypoint};
358360

0 commit comments

Comments
 (0)