Skip to content

Commit

Permalink
Fix typo in Comments
Browse files Browse the repository at this point in the history
	modified:   autosar-data/src/autosarmodel.rs
	modified:   autosar-data/src/element.rs
	modified:   autosar-data/src/lib.rs
  • Loading branch information
b4skyx authored and DanielT committed May 8, 2024
1 parent 6673987 commit e05c229
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion autosar-data/src/autosarmodel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ impl AutosarModel {
ArxmlFileIterator::new(self.clone())
}

/// Get a referenct to the root ```<AUTOSAR ...>``` element of this model
/// Get a reference to the root ```<AUTOSAR ...>``` element of this model
///
/// # Example
///
Expand Down
12 changes: 6 additions & 6 deletions autosar-data/src/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ impl Element {
///
/// This function steps through the hierarchy until an identifiable element is found.
/// It never returns the current element, even if the current element is identifiable.
///
///
/// The function returns a suitable element if one is found, or None if the root is reached.
///
///
/// # Example
///
///
/// ```
/// # use autosar_data::*;
/// # fn main() -> Result<(), AutosarDataError> {
Expand All @@ -63,9 +63,9 @@ impl Element {
/// # Ok(())
/// # }
/// ```
///
///
/// # Possible Errors
///
///
/// - [`AutosarDataError::ItemDeleted`]: The current element is in the deleted state and will be freed once the last reference is dropped
pub fn named_parent(&self) -> Result<Option<Element>, AutosarDataError> {
let mut cur_elem_opt = self.parent()?;
Expand Down Expand Up @@ -204,7 +204,7 @@ impl Element {
self.0.read().is_identifiable()
}

/// Returns true if the element should contain a referenct to another element
/// Returns true if the element should contain a reference to another element
///
/// The function does not check if the reference is valid
///
Expand Down
2 changes: 1 addition & 1 deletion autosar-data/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ pub enum ContentType {
/// Holds a weak reference to either an element or an arxml file
///
/// This enum is used for references to the parent of each element. For all elements other than the
/// root element, the parent is an element. The root element itself has a referenct to the `ArxmlFile` structure.
/// root element, the parent is an element. The root element itself has a reference to the `ArxmlFile` structure.
#[derive(Clone)]
pub(crate) enum ElementOrModel {
Element(WeakElement),
Expand Down

0 comments on commit e05c229

Please sign in to comment.