Skip to content

Commit 6f28ae5

Browse files
committed
use proper comment format
1 parent fef4174 commit 6f28ae5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/definitions.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl<T: Clone + std::fmt::Debug> DefinitionsBuilder<T> {
3232
}
3333
}
3434

35-
// Get a ReferenceId for the given reference string.
35+
/// Get a ReferenceId for the given reference string.
3636
// This ReferenceId can later be used to retrieve a definition
3737
pub fn get_reference_id(&mut self, reference: &str) -> ReferenceId {
3838
let next_id = self.definitions.len();
@@ -51,7 +51,7 @@ impl<T: Clone + std::fmt::Debug> DefinitionsBuilder<T> {
5151
}
5252
}
5353

54-
// Add a definition, returning the ReferenceId that maps to it
54+
/// Add a definition, returning the ReferenceId that maps to it
5555
pub fn add_definition(&mut self, reference: String, value: T) -> PyResult<ReferenceId> {
5656
let next_id = self.definitions.len();
5757
match self.definitions.entry(reference.clone()) {
@@ -69,8 +69,8 @@ impl<T: Clone + std::fmt::Debug> DefinitionsBuilder<T> {
6969
}
7070
}
7171

72-
// Retrieve an item definition using a ReferenceId
73-
// Will raise an error if the definition for that reference does not yet exist
72+
/// Retrieve an item definition using a ReferenceId
73+
/// Will raise an error if the definition for that reference does not yet exist
7474
pub fn get_definition(&self, reference_id: ReferenceId) -> PyResult<&T> {
7575
let (reference, def) = match self.definitions.iter().find(|(_, def)| def.id == reference_id) {
7676
Some(v) => v,
@@ -85,7 +85,7 @@ impl<T: Clone + std::fmt::Debug> DefinitionsBuilder<T> {
8585
}
8686
}
8787

88-
// Consume this Definitions into a vector of items, indexed by each items ReferenceId
88+
/// Consume this Definitions into a vector of items, indexed by each items ReferenceId
8989
pub fn finish(self) -> PyResult<Vec<T>> {
9090
// We need to create a vec of defs according to the order in their ids
9191
let mut defs: Vec<(usize, T)> = Vec::new();

0 commit comments

Comments
 (0)