|
@ -397,9 +397,7 @@ impl Build { |
|
|
/// `known_flag_support` field. If `is_flag_supported(flag)`
|
|
|
/// `known_flag_support` field. If `is_flag_supported(flag)`
|
|
|
/// is called again, the result will be read from the hash table.
|
|
|
/// is called again, the result will be read from the hash table.
|
|
|
pub fn is_flag_supported(&self, flag: &str) -> Result<bool, Error> { |
|
|
pub fn is_flag_supported(&self, flag: &str) -> Result<bool, Error> { |
|
|
let mut known_status = self.known_flag_support_status |
|
|
let mut known_status = self.known_flag_support_status.lock().unwrap(); |
|
|
.lock() |
|
|
|
|
|
.unwrap(); |
|
|
|
|
|
if let Some(is_supported) = known_status.get(flag).cloned() { |
|
|
if let Some(is_supported) = known_status.get(flag).cloned() { |
|
|
return Ok(is_supported); |
|
|
return Ok(is_supported); |
|
|
} |
|
|
} |
|
|