Skip to content

Commit

Permalink
fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
geo-ant committed Apr 21, 2024
1 parent 89059d5 commit 517183c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/model/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,20 +253,28 @@ pub enum SeparableModelBuilder<ScalarType>
where
ScalarType: Scalar,
{
#[doc(hidden)]
/// builder is in an error state
Error(ModelBuildError),
/// builder is in normal state (i.e. NOT in the process of building a function)
#[doc(hidden)]
Normal(UnfinishedModel<ScalarType>),
/// builder is in the state of building a function
#[doc(hidden)]
FunctionBuilding {
/// the currently held model
model: UnfinishedModel<ScalarType>,
/// the function we are currently building. It is added
/// to the model once a builder function is called that
/// indicates that building this function is over
function_builder: ModelBasisFunctionBuilder<ScalarType>,
},
}

/// a helper structure that represents an unfinished separable model
#[derive(Default)]
struct UnfinishedModel<ScalarType: Scalar> {
#[doc(hidden)]
pub struct UnfinishedModel<ScalarType: Scalar> {
/// the parameter names
parameter_names: Vec<String>,
/// the base functions
Expand Down Expand Up @@ -355,7 +363,7 @@ where
/// # Usage
/// For usage see the documentation of the [SeparableModelBuilder](crate::model::builder::SeparableModelBuilder)
/// struct documentation.
pub fn invariant_function<F>(mut self, function: F) -> Self
pub fn invariant_function<F>(self, function: F) -> Self
where
F: Fn(&DVector<ScalarType>) -> DVector<ScalarType> + 'static,
{
Expand Down
2 changes: 1 addition & 1 deletion src/model/builder/modelfunction_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::model::model_basis_function::ModelBasisFunction;
/// (all other derivatives are zero, because the function does not depends on other params)
///
#[doc(hidden)]
pub(crate) struct ModelBasisFunctionBuilder<ScalarType>
pub struct ModelBasisFunctionBuilder<ScalarType>
where
ScalarType: Scalar,
{
Expand Down
3 changes: 2 additions & 1 deletion src/model/model_basis_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ type BaseFuncType<ScalarType> =

/// An internal type that is used to store basefunctions whose interface has been wrapped in
/// such a way that they can accept the location and the *complete model parameters as arguments*.
pub(crate) struct ModelBasisFunction<ScalarType>
#[doc(hidden)]
pub struct ModelBasisFunction<ScalarType>
where
ScalarType: Scalar,
{
Expand Down

0 comments on commit 517183c

Please sign in to comment.