From 13c49387efc0342c585be0ef48835588c05bf4d1 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sun, 31 May 2020 12:36:31 +0800 Subject: [PATCH] Add OptimizationLevel::is_simple --- src/optimize.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/optimize.rs b/src/optimize.rs index f8b0d1bb..20ccfa3c 100644 --- a/src/optimize.rs +++ b/src/optimize.rs @@ -37,6 +37,10 @@ impl OptimizationLevel { pub fn is_none(self) -> bool { self == Self::None } + /// Is the `OptimizationLevel` Simple. + pub fn is_simple(self) -> bool { + self == Self::Simple + } /// Is the `OptimizationLevel` Full. pub fn is_full(self) -> bool { self == Self::Full