Skip to main content

minimum_maturity_level

Function minimum_maturity_level 

Source
pub fn minimum_maturity_level(scores: &[u8]) -> Option<u8>
Expand description

The minimum score across a set of per-dimension maturity levels — the chapter’s recommended honest overall score.

Each score is expected to be in 1..=5, but this function itself simply takes the minimum of whatever values are given; validating the range is the caller’s responsibility.

§Arguments

  • scores — one maturity level per dimension assessed.

§Returns

The minimum level, or None if scores is empty.

§Examples

use software_engineering::maturity_model::minimum_maturity_level;

assert_eq!(minimum_maturity_level(&[4, 4, 4, 1, 4]), Some(1));
assert_eq!(minimum_maturity_level(&[]), None);