pub fn replace(&mut self, path: &str, secret: Secret) -> bool {
		let val = self.entry(path.to_owned()).or_insert(None);
		let prev_val = val.take();

		// if the secret has changed
		let res = prev_val.is_none() || prev_val.unwrap() != secret;
		// replace/restore (after take) the secret value
		*val = Some(secret);
		res
	}
/// Replace the secret at path if it has changed, and return true if it has been replaced
Replace the secret at path if it has changed, and return true if it has been replaced
Replace the secret at path if it has changed and return true if it has been replaced
pub fn replace(&mut self, path: &str, secret: Secret) -> bool {
		let val = self.entry(path.to_owned()).or_insert(None);
		let prev_val = val.take();
		// if the secret has changed
		let res = prev_val.is_none() || prev_val.unwrap() != secret;
		// replace/restore (after take) the secret value
		*val = Some(secret);
		res
	}
pub fn replace ( & mut self , path : & str , secret : Secret ) -> bool { let val = self . entry ( path . to_owned ( ) ) . or_insert ( None ) ; let prev_val = val . take ( ) ; // if the secret has changed let res = prev_val . is_none ( ) || prev_val . unwrap ( ) != secret ; // replace/restore (after take) the secret value * val = Some ( secret ) ; res }
Replace the secret at path if it has changed, and return true if it has been replaced
Replace the secret at path if it has changed and return true if it has been replaced
&mut self
path
&str
secret
Secret
&mut self
path
&str
secret
Secret