More format
For some reason my cargo disagrees with the use line
This commit is contained in:
@@ -287,10 +287,11 @@ impl AuthorizationGrant {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use mas_matrix::MockHomeserverConnection;
|
||||
use rand::thread_rng;
|
||||
|
||||
use super::*;
|
||||
|
||||
fn get_homeserver() -> BoxHomeserverConnection {
|
||||
Box::new(MockHomeserverConnection::new("example.com"))
|
||||
}
|
||||
|
||||
@@ -173,9 +173,7 @@ impl<K: FormField> FormState<K> {
|
||||
|
||||
/// Checks if a field contains a value
|
||||
pub fn has_value(&self, field: K) -> bool {
|
||||
self.fields
|
||||
.get(&field)
|
||||
.is_some_and(|f| f.value.is_some())
|
||||
self.fields.get(&field).is_some_and(|f| f.value.is_some())
|
||||
}
|
||||
|
||||
/// Returns `true` if the form has no error attached to it
|
||||
|
||||
Reference in New Issue
Block a user