Skip to content

Commit

Permalink
fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
imrn99 committed Jan 8, 2025
1 parent 4185387 commit c2aa217
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 4 additions & 3 deletions honeycomb-core/src/attributes/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub trait AttributeUpdate: Sized + Send + Sync + Clone + Copy {
/// Splitting routine, i.e. how to obtain the two new values from a single one.
fn split(attr: Self) -> (Self, Self);

#[allow(clippy::missing_errors_doc)]
/// Fallback merging routine, i.e. how to obtain a new value from a single existing one.
///
/// The returned value directly affects the behavior of sewing methods: For example, if this
Expand All @@ -80,13 +81,14 @@ pub trait AttributeUpdate: Sized + Send + Sync + Clone + Copy {
Ok(attr)
}

#[allow(clippy::missing_errors_doc)]
/// Fallback merging routine, i.e. how to obtain a new value from no existing one.
///
/// The returned value directly affects the behavior of sewing methods: For example, if this
/// method returns an error for a given attribute, the `sew` method will fail. This allows the
/// user to define some attribute-specific behavior and enable fallbacks when it makes sense.
///
/// # Return / Errors
/// # Errors
///
/// The default implementation fails with `Err(CMapError::FailedAttributeMerge)`.
#[allow(clippy::must_use_candidate)]
Expand All @@ -101,10 +103,9 @@ pub trait AttributeUpdate: Sized + Send + Sync + Clone + Copy {
/// user to define some attribute-specific behavior and enable fallbacks when it makes sense.
/// value).
///
/// # Return / Errors
/// # Errors
///
/// The default implementation fails with `Err(CMapError::FailedAttributeSplit)`.
#[allow(clippy::must_use_candidate)]
fn split_from_none() -> CMapResult<(Self, Self)> {
Err(CMapError::FailedAttributeSplit(type_name::<Self>()))
}
Expand Down
2 changes: 2 additions & 0 deletions honeycomb-core/src/cmap/dim2/links/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ impl<T: CoordsFloat> CMap2<T> {
}
}

#[allow(clippy::missing_panics_doc)]
/// `I`-link operator.
///
/// This variant is equivalent to [`link`][Self::link], but internally uses a transaction that
Expand All @@ -111,6 +112,7 @@ impl<T: CoordsFloat> CMap2<T> {
}
}

#[allow(clippy::missing_panics_doc)]
/// # `I`-unlink operator.
///
/// This variant is equivalent to [`unlink`][Self::unlink], but internally uses a transaction
Expand Down
2 changes: 2 additions & 0 deletions honeycomb-core/src/cmap/dim2/sews/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ impl<T: CoordsFloat> CMap2<T> {
}
}

#[allow(clippy::missing_panics_doc)]
/// `I`-sew operator.
///
/// This variant is equivalent to [`sew`][Self::sew], but internally uses a transaction that
Expand All @@ -124,6 +125,7 @@ impl<T: CoordsFloat> CMap2<T> {
}
}

#[allow(clippy::missing_panics_doc)]
/// `I`-unsew operator.
///
/// This variant is equivalent to [`unsew`][Self::unsew], but internally uses a transaction that
Expand Down

0 comments on commit c2aa217

Please sign in to comment.