()
| 2060 | } |
| 2061 | |
| 2062 | pub fn update() -> Result<()> { |
| 2063 | // Note: PreferenceManager::get() can't be part of the "if let ..." as its scope apparently includes the call to invalidate() which causes a borrow problem |
| 2064 | let files_changed = PreferenceManager::get().borrow_mut().is_up_to_date()?; |
| 2065 | if let Some(files_changed) = files_changed { |
| 2066 | SpeechRules::invalidate(files_changed); |
| 2067 | } |
| 2068 | PreferenceManager::get().borrow_mut().initialize(PathBuf::new())?; |
| 2069 | return Ok( () ); |
| 2070 | } |
| 2071 | |
| 2072 | fn read_patterns(&mut self, path: &Locations) -> Result<()> { |
| 2073 | if let Some(p) = &path[0] { |
nothing calls this directly
no test coverage detected