You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
storage: split the repository trait
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
use oauth2_types::scope::ScopeToken;
|
||||
use rand::{
|
||||
distributions::{Alphanumeric, DistString},
|
||||
Rng,
|
||||
RngCore,
|
||||
};
|
||||
use serde::Serialize;
|
||||
use thiserror::Error;
|
||||
@ -48,7 +48,7 @@ impl Device {
|
||||
}
|
||||
|
||||
/// Generate a random device ID
|
||||
pub fn generate<R: Rng + ?Sized>(rng: &mut R) -> Self {
|
||||
pub fn generate<R: RngCore + ?Sized>(rng: &mut R) -> Self {
|
||||
let id: String = Alphanumeric.sample_string(rng, DEVICE_ID_LENGTH);
|
||||
Self { id }
|
||||
}
|
||||
|
Reference in New Issue
Block a user