Skip to content

Commit e2d176e

Browse files
committed
Lrs: initial implementation
1 parent a1097f6 commit e2d176e

File tree

3 files changed

+797
-2
lines changed

3 files changed

+797
-2
lines changed

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ mod lrs_generated;
99
pub mod curves;
1010
#[deny(missing_docs)]
1111
pub mod lrm_scale;
12+
#[deny(missing_docs)]
13+
pub mod lrs;
1214
pub use lrs_generated::*;
1315

1416
#[test]

src/lrm_scale.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ impl ScaleBuilder {
153153
/// A measure defines a location on the [LrmScale].
154154
/// It is given as an [Anchor] name and an `offset` on that scale.
155155
/// It is often represented as `12+100` to say `“100 scale units after the Anchor 12`”.
156+
#[derive(Clone, Debug)]
156157
pub struct LrmScaleMeasure {
157158
/// `Name` of the [Anchor]. While it is often named after a kilometer position,
158159
/// it can be anything (a letter, a landmark).
@@ -306,9 +307,9 @@ impl LrmScale {
306307
}
307308

308309
#[cfg(test)]
309-
mod tests {
310+
pub mod tests {
310311
use super::*;
311-
fn scale() -> LrmScale {
312+
pub fn scale() -> LrmScale {
312313
ScaleBuilder::new(Anchor::new("a", 0., 0.))
313314
.add_named("b", 10., 100.)
314315
.build("id")

0 commit comments

Comments
 (0)