system_properties: Fix FnMut/FnOnce type mismatch

This was technically unsound, and just happened to work until rustc
1.56.1, at which point something got smart enough to realize these
types did not match and optimize based on that.

Test: Launch keystore2 with rustc 1.56.1
Change-Id: I3206a86e699c5caf69c665f46588c49ae1a17d26
diff --git a/system_properties.rs b/system_properties.rs
index 5dc7a57..a8f2f29 100644
--- a/system_properties.rs
+++ b/system_properties.rs
@@ -88,7 +88,7 @@
         }
     }
 
-    fn read_raw(prop_info: *const PropInfo, mut f: impl FnOnce(Option<&CStr>, Option<&CStr>)) {
+    fn read_raw(prop_info: *const PropInfo, mut f: impl FnMut(Option<&CStr>, Option<&CStr>)) {
         // Unsafe function converts values passed to us by
         // __system_property_read_callback to Rust form
         // and pass them to inner callback.
@@ -104,9 +104,9 @@
             f(name, value);
         }
 
-        let mut f: &mut dyn FnOnce(Option<&CStr>, Option<&CStr>) = &mut f;
+        let mut f: &mut dyn FnMut(Option<&CStr>, Option<&CStr>) = &mut f;
 
-        // Unsafe block for FFI call. We convert the FnOnce
+        // Unsafe block for FFI call. We convert the FnMut
         // to a void pointer, and unwrap it in our callback.
         unsafe {
             system_properties_bindgen::__system_property_read_callback(
@@ -121,9 +121,9 @@
     /// of this system property. See documentation for
     /// `__system_property_read_callback` for details.
     /// Returns an error if the property is empty or doesn't exist.
-    pub fn read<T, F>(&mut self, f: F) -> Result<T>
+    pub fn read<T, F>(&mut self, mut f: F) -> Result<T>
     where
-        F: FnOnce(&str, &str) -> anyhow::Result<T>,
+        F: FnMut(&str, &str) -> anyhow::Result<T>,
     {
         let prop_info = self.get_prop_info().ok_or(PropertyWatcherError::SystemPropertyAbsent)?;
         let mut result = Err(PropertyWatcherError::ReadCallbackNotCalled);